Revision: 201017
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 14 May 2010 16:24:46 +0300
changeset 19 e44a8c097b15
parent 15 d7fc66ccd6fb
child 21 5c9f230baf1b
child 23 427125ac6cb8
Revision: 201017 Kit: 201019
cbs/cbsui/resources/cbs_app.docml
cbs/cbsui/resources/cbs_topic_view.docml
cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallbarringwrapper_p.cpp
convergedcallengine/cce/src/cccecallparameters.cpp
phoneclientserver/callui/rom/callui.iby
phoneclientserver/callui/rom/callui_variant.iby
phoneclientserver/callui/rom/calluiresources.iby
phoneclientserver/callui/src/cauiengine/cauiactiveobject.cpp
phoneclientserver/callui/src/cauiengine/cauidialdatacontainer.cpp
phoneclientserver/callui/src/cauiengine/cauidialogs.cpp
phoneclientserver/callui/src/cauiengine/cauiengfactimpl.cpp
phoneclientserver/callui/src/cauiengine/cauiengine.cpp
phoneclientserver/callui/src/cauiengine/cauienginemain.cpp
phoneclientserver/callui/src/cauiengine/cauienginestub.cpp
phoneclientserver/callui/src/cauiengine/cauimessagesender.cpp
phoneclientserver/callui/src/cauiengine/cauimessagesenderstub.cpp
phoneclientserver/callui/src/cauiengine/cauiquery.cpp
phoneclientserver/callui/src/cauiengine/cauivoipextension.cpp
phoneclientserver/callui/src/cauiengine/ccauireconnectquery.cpp
phoneclientserver/callui/src/cauiengine/ccauireconnectqueryimpl.cpp
phoneclientserver/callui/src/cauiplugin/cauimain.cpp
phoneclientserver/callui/src/cauiplugin/cauiplugin.cpp
phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdNoteController.cpp
phonesrv_plat/converged_call_engine_api/inc/cccecallparameters.h
phonesrv_plat/converged_call_provider_api/inc/ccpdefs.h
phonesrv_plat/dialpad_api/inc/dialpadkeyhandler.h
phonesrv_plat/voice_mailbox_number_api/inc/cvoicemailbox.h
phonesrv_plat/voice_mailbox_number_api/inc/cvoicemailboxentry.h
phonesrv_plat/voice_mailbox_number_api/inc/mvoicemailboxobserver.h
phonesrv_plat/voice_mailbox_number_api/inc/voicemailboxdefs.h
phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.cpp
phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.h
phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.pro
satengine/SatServer/Commands/SetUpCallCmd/group/SetUpCallCmd.mmp
satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h
satengine/SatServer/Commands/SetUpCallCmd/inc/csetupcallrequesthandler.h
satengine/SatServer/Commands/SetUpCallCmd/inc/csetupcallstatushandler.h
satengine/SatServer/Commands/SetUpCallCmd/src/CSetUpCallHandler.cpp
satengine/SatServer/Commands/SetUpCallCmd/src/csetupcallrequesthandler.cpp
satengine/SatServer/Commands/SetUpCallCmd/src/csetupcallstatushandler.cpp
satengine/SatServer/Commands/SetUpIdleModeTextCmd/inc/CSetUpIdleModeTextHandler.h
satengine/SatServer/Commands/SetUpIdleModeTextCmd/src/CSetUpIdleModeTextHandler.cpp
satui/satapp/inc/dialogwaiter.h
satui/satapp/resource/qgn_menu_sat.svg
satui/satapp/resource/qtg_large_sat.svg
satui/satapp/resource/sat_text_map.xls
satui/satapp/resource/satapp.docml
satui/satapp/resource/satapp.qrc
satui/satapp/satapp.pro
satui/satapp/src/dialogwaiter.cpp
satui/satapp/src/satappuiprovider.cpp
satui/satapp/src/satappview.cpp
satui/satapp/tsrc/ut_satapp/sis/utsatapp_template.SIS
satui/satapp/tsrc/ut_satapp/sis/utsatapp_template.pkg
telutils/dialpad/dialpad.pro
telutils/dialpad/inc/dialpadbutton.h
telutils/dialpad/inc/dialpadbuttonstyle.h
telutils/dialpad/inc/dialpadinputfield.h
telutils/dialpad/inc/dialpadkeypad.h
telutils/dialpad/inc/dialpadkeysequenceeventfilter.h
telutils/dialpad/resources/dialpad.css
telutils/dialpad/resources/dialpad.dialpadbutton.widgetml
telutils/dialpad/src/dialpad.cpp
telutils/dialpad/src/dialpadbutton.cpp
telutils/dialpad/src/dialpadbuttonstyle.cpp
telutils/dialpad/src/dialpadinputfield.cpp
telutils/dialpad/src/dialpadkeyhandler.cpp
telutils/dialpad/src/dialpadkeypad.cpp
telutils/dialpad/src/dialpadkeysequenceeventfilter.cpp
telutils/dialpad/src/dialpadvoicemailboxeventfilter.cpp
telutils/dialpad/tsrc/dialpadtest/dialpadtestview.cpp
telutils/dialpad/tsrc/unit/runall.cmd
telutils/dialpad/tsrc/unit/shared/mock_dialpad.cpp
telutils/dialpad/tsrc/unit/shared/mock_hblineedit.cpp
telutils/dialpad/tsrc/unit/shared/mock_xqservicerequest.cpp
telutils/dialpad/tsrc/unit/unit.pro
telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/hblineedit.h
telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.cpp
telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.h
telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.pro
telutils/dialpad/tsrc/unit/ut_dialpadvoicemailboxeventfilter/ut_dialpadvoicemailboxeventfilter.cpp
telutils/telephonyservice/src/ccallinformationimpl.cpp
telutils/xqtelephonyservice/xqtelephonyservice.pro
vmbx/vmbxcpplugin/inc/vmbxcpgroup.h
vmbx/vmbxcpplugin/inc/vmbxcpplugin.h
vmbx/vmbxcpplugin/inc/vmbxuiengine.h
vmbx/vmbxcpplugin/rom/rom.pri
vmbx/vmbxcpplugin/rom/vmbxcpplugin.pkg
vmbx/vmbxcpplugin/rom/vmbxcpplugin_stub.pkg
vmbx/vmbxcpplugin/rom/vmbxcpplugin_stub.sis
vmbx/vmbxcpplugin/src/vmbxcpgroup.cpp
vmbx/vmbxcpplugin/src/vmbxcpplugin.cpp
vmbx/vmbxcpplugin/src/vmbxuiengine.cpp
vmbx/vmbxcpplugin/tsrc/inc/ut_vmbxcpplugin.h
vmbx/vmbxcpplugin/tsrc/inc/ut_vmbxuiengine.h
vmbx/vmbxcpplugin/tsrc/src/main.cpp
vmbx/vmbxcpplugin/tsrc/src/ut_dummyvoicemailbox.cpp
vmbx/vmbxcpplugin/tsrc/src/ut_dummyvoicemailboxentry.cpp
vmbx/vmbxcpplugin/tsrc/src/ut_vmbxcpplugin.cpp
vmbx/vmbxcpplugin/tsrc/src/ut_vmbxuiengine.cpp
vmbx/vmbxcpplugin/tsrc/ut_vmbxcpplugin.pro
vmbx/vmbxcpplugin/vmbxcpplugin.pri
vmbx/vmbxcpplugin_version_history.txt
vmbx/vmbxengine/inc/dialogwaiter.h
vmbx/vmbxengine/inc/mvmbxcenrephandler.h
vmbx/vmbxengine/inc/mvmbxcenrepobserver.h
vmbx/vmbxengine/inc/mvmbxchangeobserver.h
vmbx/vmbxengine/inc/mvmbxresourceprovider.h
vmbx/vmbxengine/inc/mvmbxsatrefreshobserver.h
vmbx/vmbxengine/inc/mvmbxservicenotify.h
vmbx/vmbxengine/inc/mvmbxsimstoreobserver.h
vmbx/vmbxengine/inc/mvmbxuihandler.h
vmbx/vmbxengine/inc/mvmbxuiutilities.h
vmbx/vmbxengine/inc/vmbshandler.h
vmbx/vmbxengine/inc/vmbxcenrephandler.h
vmbx/vmbxengine/inc/vmbxcenrepobserver.h
vmbx/vmbxengine/inc/vmbxcsvideoengine.h
vmbx/vmbxengine/inc/vmbxcsvoiceengine.h
vmbx/vmbxengine/inc/vmbxemergencycall.h
vmbx/vmbxengine/inc/vmbxenginebase.h
vmbx/vmbxengine/inc/vmbxenginefactory.h
vmbx/vmbxengine/inc/vmbxetelconnection.h
vmbx/vmbxengine/inc/vmbxlogger.h
vmbx/vmbxengine/inc/vmbxobserver.h
vmbx/vmbxengine/inc/vmbxpbkstore.h
vmbx/vmbxengine/inc/vmbxqtuihandler.h
vmbx/vmbxengine/inc/vmbxsatrefreshobserver.h
vmbx/vmbxengine/inc/vmbxsimhandler.h
vmbx/vmbxengine/inc/vmbxsimstoreobserver.h
vmbx/vmbxengine/inc/vmbxuihandler.h
vmbx/vmbxengine/inc/vmbxuiutilities.h
vmbx/vmbxengine/inc/vmbxutilities.h
vmbx/vmbxengine/inc/vmbxvoipengine.h
vmbx/vmbxengine/inc/voicemailboxdefsinternal.h
vmbx/vmbxengine/inc/voicemailboximpl.h
vmbx/vmbxengine/rom/vmbxresources.iby
vmbx/vmbxengine/src/dialogwaiter.cpp
vmbx/vmbxengine/src/vmbxcenrephandler.cpp
vmbx/vmbxengine/src/vmbxcsvideoengine.cpp
vmbx/vmbxengine/src/vmbxcsvoiceengine.cpp
vmbx/vmbxengine/src/vmbxenginebase.cpp
vmbx/vmbxengine/src/vmbxpbkstore.cpp
vmbx/vmbxengine/src/vmbxqtuihandler.cpp
vmbx/vmbxengine/src/vmbxuihandler.cpp
vmbx/vmbxengine/src/vmbxuiutilities.cpp
vmbx/vmbxengine/src/vmbxutilities.cpp
vmbx/vmbxengine/src/vmbxvoipengine.cpp
vmbx/vmbxengine/src/vmspshandler.cpp
vmbx/vmbxengine/src/voicemailboximpl.cpp
vmbx/vmbxengine/tsrc/ut_vmbxengine/inc/ut_pbkstore.h
vmbx/vmbxengine/tsrc/ut_vmbxengine/inc/ut_simhandler.h
vmbx/vmbxengine/tsrc/ut_vmbxengine/inc/ut_vmbxengine.h
vmbx/vmbxengine/tsrc/ut_vmbxengine/src/cenrep_mock.cpp
vmbx/vmbxengine/tsrc/ut_vmbxengine/src/etel_mock.cpp
vmbx/vmbxengine/tsrc/ut_vmbxengine/src/main.cpp
vmbx/vmbxengine/tsrc/ut_vmbxengine/src/mpbutil_mock.cpp
vmbx/vmbxengine/tsrc/ut_vmbxengine/src/qtuihandler_mock.cpp
vmbx/vmbxengine/tsrc/ut_vmbxengine/src/ut_pbkstore.cpp
vmbx/vmbxengine/tsrc/ut_vmbxengine/src/ut_simhandler.cpp
vmbx/vmbxengine/tsrc/ut_vmbxengine/src/ut_vmbxengine.cpp
vmbx/vmbxengine/tsrc/ut_vmbxengine/ut_vmbxengine.pro
vmbx/vmbxengine/vmbxengine.pro
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/resources/cbs_app.docml	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument context="cbs_app_xml" version="0.8">
+    <object name="t:toggle_reception" type="HbAction">
+        <string name="text" value="Activate reception"/>
+    </object>
+    <object name="t:add_topic" type="HbAction">
+        <string name="iconText" value="Add topic"/>
+        <string locid="txt_cbs_add_topic" name="text" value="Add topic"/>
+        <string name="toolTip" value="Add topic"/>
+    </object>
+    <object name="t:settings" type="HbAction">
+        <string name="iconText" value="Settings"/>
+        <string locid="txt_cbs_settings" name="text" value="Settings"/>
+        <string locid="txt_cbs_settings" name="toolTip" value="Settings"/>
+    </object>
+    <object name="t:exit" type="HbAction">
+        <string name="iconText" value="Exit"/>
+        <string locid="txt_cbs_exit" name="text" value="Exit"/>
+        <string name="toolTip" value="Exit"/>
+    </object>
+    <object name="t:help" type="HbAction">
+        <string name="iconText" value="Help"/>
+        <string locid="txt_cbs_help" name="text" value="Help"/>
+        <string name="toolTip" value="Help"/>
+    </object>
+    <object name="t:toggle_reception" type="HbAction">
+        <string name="iconText" value="Activate"/>
+        <string locid="txt_cbs_activate" name="text" value="Activate"/>
+        <string name="toolTip" value="Activate"/>
+    </object>
+    <object name="t:open" type="HbAction">
+        <string locid="txt_cbs_open" name="text" value="Open"/>
+    </object>
+    <object name="t:subscribe" type="HbAction">
+        <string locid="txt_cbs_subscribe" name="text" value="Subscribe"/>
+    </object>
+    <object name="t:unsubscribe" type="HbAction">
+        <string locid="txt_cbs_unsubscribe" name="text" value="Unsubscribe"/>
+    </object>
+    <object name="t:hotmark" type="HbAction">
+        <string locid="txt_cbs_hotmark" name="text" value="Hotmark"/>
+    </object>
+    <object name="t:unhotmark" type="HbAction">
+        <string locid="txt_cbs_unhotmark" name="text" value="Unhotmark"/>
+    </object>
+    <object name="t:delete" type="HbAction">
+        <string locid="txt_cbs_delete" name="text" value="Delete"/>
+    </object>
+    <object name="t:edit" type="HbAction">
+        <string locid="txt_cbs_edit" name="text" value="Edit"/>
+    </object>
+    <widget name="t:view" type="CbsUiTopicListView">
+        <widget name="t:menu" role="HbView:menu" type="HbMenu">
+            <ref object="t:settings" role="HbMenu:addAction"/>
+            <ref object="t:help" role="HbMenu:addAction"/>
+            <ref object="t:exit" role="HbMenu:addAction"/>
+        </widget>
+        <widget name="content" role="HbView:widget" type="HbWidget">
+            <widget name="t:topicIndex" type="HbListWidget">
+                <real name="z" value="1"/>
+                <sizehint height="15un" type="PREFERRED" width="53.58209un"/>
+            </widget>
+            <widget name="t:label" type="HbLabel">
+                <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
+                <real name="z" value="2"/>
+                <sizehint height="6.47761un" type="PREFERRED" width="53.58209un"/>
+                <string name="plainText" value="Topics"/>
+                <enums name="textFormat" value="RichText"/>
+            </widget>
+            <widget name="t:ListWidget" type="HbListWidget">
+                <real name="z" value="3"/>
+                <sizehint height="48.0597un" type="PREFERRED" width="53.43284un"/>
+            </widget>
+            <enums name="focusMode" value="FocusModeEdit"/>
+            <layout orientation="Vertical" spacing="0un" type="linear">
+                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
+                <linearitem itemname="t:topicIndex"/>
+                <linearitem itemname="t:label" spacing="0un"/>
+                <linearitem itemname="t:ListWidget"/>
+            </layout>
+        </widget>
+        <widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
+            <ref object="t:toggle_reception" role="HbToolBar:addAction"/>
+            <ref object="t:add_topic" role="HbToolBar:addAction"/>
+        </widget>
+        <string locid="txt_cbs_title" name="title" value="Operator Messages"/>
+    </widget>
+    <metadata activeUIState="Common ui state" display="QHD portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/resources/cbs_topic_view.docml	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.8">
+    <object name="action" type="HbAction">
+        <string name="text" value="&lt;&lt; Previous"/>
+    </object>
+    <object name="action_1" type="HbAction">
+        <string name="text" value="Next &gt;&gt;"/>
+    </object>
+    <object name="action_2" type="HbAction">
+        <string name="text" value="Back"/>
+    </object>
+    <widget name="t:view2" type="CbsUiTopicView">
+        <widget name="content" role="HbView:widget" type="HbWidget">
+            <widget name="listWidget2" type="HbListWidget">
+                <real name="z" value="3"/>
+                <sizehint height="9.85075un" type="PREFERRED" width="53.43284un"/>
+            </widget>
+            <widget name="treeView" type="HbTreeView">
+                <real name="z" value="4"/>
+                <sizehint height="70.59702un" type="PREFERRED" width="53.43284un"/>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="listWidget2" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="listWidget2" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="treeView" dstEdge="LEFT" spacing="0.14925un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="treeView" dstEdge="TOP" spacing="9.70149un" src="" srcEdge="TOP"/>
+            </layout>
+        </widget>
+        <widget name="viewMenu" role="HbView:menu" type="HbMenu"/>
+        <widget name="viewToolbar" role="HbView:toolBar" type="HbToolBar">
+            <ref object="action" role="HbToolBar:addAction"/>
+            <ref object="action_2" role="HbToolBar:addAction"/>
+        </widget>
+        <string locid="txt_cbs_title" name="title" value="Operator Messages"/>
+    </widget>
+    <metadata activeUIState="Common ui state" display="QHD portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- a/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallbarringwrapper_p.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallbarringwrapper_p.cpp	Fri May 14 16:24:46 2010 +0300
@@ -202,12 +202,11 @@
     
     TServiceGroup convertedServiceGroup = convertServiceGroup(serviceGroup);
     TBarringProgram convertedBarringType = convertBarringType(barringType);
-    
+
+    m_currentRequest = RequestBarringStatus;
     QT_TRAP_THROWING(m_callBarring->GetBarringStatusL(
         convertedServiceGroup, convertedBarringType)
     )
-    
-    m_currentRequest = RequestBarringStatus;
 }
 
 
@@ -228,11 +227,11 @@
     setting.iPassword.Copy(barringPassword.utf16());
     
     TBasicServiceGroups serviceGroups = EAllTeleAndBearer;
+    
+    m_currentRequest = RequestEnableBarring;
     QT_TRAP_THROWING(
         m_callBarring->SetBarringL(setting, serviceGroups);
     )
-    
-    m_currentRequest = RequestEnableBarring;
 }
 
 
@@ -253,11 +252,11 @@
     setting.iPassword.Copy(barringPassword.utf16());
     
     TBasicServiceGroups serviceGroups = EAllTeleAndBearer;
+
+    m_currentRequest = RequestDisableBarring;
     QT_TRAP_THROWING(
         m_callBarring->SetBarringL(setting, serviceGroups);
-    )
-    
-    m_currentRequest = RequestDisableBarring;
+    )    
 }
 
 
@@ -274,11 +273,10 @@
     passwordChange.iNewPassword.Copy(newPassword.utf16());
     passwordChange.iVerifiedPassword.Copy(verifiedPassword.utf16());
     
+    m_currentRequest = RequestChangePassword;
     QT_TRAP_THROWING(
         m_callBarring->ChangePasswordL(passwordChange);
     )
-    
-    m_currentRequest = RequestChangePassword;
 }
 
 
--- a/convergedcallengine/cce/src/cccecallparameters.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/convergedcallengine/cce/src/cccecallparameters.cpp	Fri May 14 16:24:46 2010 +0300
@@ -65,6 +65,7 @@
     cloned->SetLineType(iLineType);
     cloned->SetUUSId(iUUSId);
     cloned->SetOrigin(iOrigin);
+    cloned->SetAlphaId(iAlphaId);
     return cloned;
     }
 
@@ -175,6 +176,15 @@
     return iOrigin;
     }
 
+void CCCECallParameters::SetAlphaId(TBuf<KCCPAlphaIdMaxSize> aAlphaId)
+    {
+    iAlphaId = aAlphaId;
+    }
 
 
+TBuf<KCCPAlphaIdMaxSize> CCCECallParameters::AlphaId() const
+    {
+    return iAlphaId;
+    }
+
 // End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/rom/callui.iby	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CallUi's iby definitions.
+ *
+*/
+
+
+#ifndef __CALLUI_IBY__
+#define __CALLUI_IBY__
+
+REM CallUI Plugin
+ECOM_PLUGIN(cauiplugin.dll,101f868e.rsc)
+
+REM CallUI Engine
+file=ABI_DIR\BUILD_DIR\cauiengine.dll       SHARED_LIB_DIR\cauiengine.dll
+
+REM Enabler for exlipsing ROM binaries
+data=ZSYSTEM\install\callui_stub.sis       system\install\callui_stub.sis
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/rom/callui_variant.iby	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CallUi's iby definitions.
+ *
+*/
+
+
+#ifndef __CALLUI_VARIANT_IBY__
+#define __CALLUI_VARIANT_IBY__
+
+#ifdef __JAPAN_PREFIX_CHANGE
+file=ABI_DIR\BUILD_DIR\dialutils.dll                        SHARED_LIB_DIR\dialutils.dll
+#endif //  __JAPAN_PREFIX_CHANGE
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/rom/calluiresources.iby	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CallUIResource's iby definitions.
+ *
+*/
+
+
+#ifndef __CALLUI_RESOURCES_IBY__
+#define __CALLUI_RESOURCES_IBY__
+
+data=DATAZ_\RESOURCE_FILES_DIR\CallUI.rsc  RESOURCE_FILES_DIR\CallUI.rsc
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiengine/cauiactiveobject.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,467 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Active object to handle global list query results.
+*
+*/
+
+
+
+
+// INCLUDE FILES
+#include    "cauiactiveobject.h" 
+#include    "cauiqueryobserver.h" 
+#include    <coemain.h>
+
+#include    <mcauireconnectqueryobserver.h>
+#include    <cphonecntfactory.h>
+#include    <cphcntmatcher.h> 
+#include    <mphcntmatch.h> 
+#include    "cauimessagesender.h" 
+#include    "cauilogger.h" 
+// CONSTANTS
+
+
+
+// The message editor granularity.
+const TInt KCaUiMessageEditorArrayGranularity = 1;
+
+// The reconnect query options granularity.
+#ifdef RD_UNIFIED_EDITOR
+const TInt KCaUiReConQueryOptionsArrayGranularity = 3;
+#else // RD_UNIFIED_EDITOR
+const TInt KCaUiReConQueryOptionsArrayGranularity = 4;
+#endif // RD_UNIFIED_EDITOR
+// The editor values that this active object supports.
+enum
+    {
+#ifdef RD_UNIFIED_EDITOR
+    ECaUiEditorMSG = 0   // Unified editor.
+#else  // RD_UNIFIED_EDITOR
+    ECaUiEditorSMS = 0,  // SMS editor.
+    ECaUiEditorMMS = 1   // MMS editor.
+#endif // RD_UNIFIED_EDITOR
+    };
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// CCaUiGlnActiveObject::CCaUiGlnActiveObject
+// 
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CCaUiGlnActiveObject::CCaUiGlnActiveObject( 
+    MCaUiReconnectQueryObserver& aObserver )
+:   CActive( EPriorityStandard ),
+    iObserver( &aObserver )
+    {
+    CActiveScheduler::Add( this );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiGlnActiveObject::ConstructL
+// 
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CCaUiGlnActiveObject::ConstructL(
+    CPhCntMatcher* aPhCntMatcher,
+    const TPtrC aPhoneNumber,
+    const TPtrC aAlias )
+    {
+    CAUILOGSTRING("CALLUI: >>> CCaUiGlnActiveObject::ConstructL() begin");
+    iReConQueryOptions = new ( ELeave ) CCaUiTIntArray( 
+        KCaUiReConQueryOptionsArrayGranularity );
+
+    // Get recipient info - is always available here
+    iRealAddress = 
+        new ( ELeave ) CDesCArrayFlat( KCaUiMessageEditorArrayGranularity );
+    iRealAddress->AppendL( aPhoneNumber );
+
+    iAliases = new ( ELeave ) CDesC16ArrayFlat( 
+        KCaUiMessageEditorArrayGranularity );
+
+    if ( aAlias.Length() != 0 )
+        {
+        // Alias was given, so matcher is not needed.
+        iAliases->AppendL( aAlias );
+
+        // Matcher does not exist.
+        iOwnMatcher = EFalse;
+        }
+    else
+        {
+        // Create matcher objects if needed.
+        if ( !aPhCntMatcher )
+            {
+            iOwnMatcher = ETrue;
+            iPhCntFactory = CreateCntFactoryL();
+            iPhCntMatcher = iPhCntFactory->CreateContactMatcherL();
+            }
+        else
+            {
+            iOwnMatcher = EFalse;
+            iPhCntMatcher = aPhCntMatcher;
+            }
+        }
+    CAUILOGSTRING("CALLUI: >>> CCaUiGlnActiveObject::ConstructL() end");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiGlnActiveObject::NewL
+// 
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiGlnActiveObject* CCaUiGlnActiveObject::NewL( 
+    MCaUiReconnectQueryObserver& aObserver,
+    CPhCntMatcher* aPhCntMatcher,
+    const TPtrC aPhoneNumber,
+    const TPtrC aAlias )
+    {
+    CCaUiGlnActiveObject* self = new( ELeave ) CCaUiGlnActiveObject (
+        aObserver );
+    
+    CleanupStack::PushL( self );
+    self->ConstructL( 
+        aPhCntMatcher,
+        aPhoneNumber,
+        aAlias );
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiGlnActiveObject::~CCaUiGlnActiveObject
+// 
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiGlnActiveObject::~CCaUiGlnActiveObject()
+    {
+    Cancel();
+
+    delete iReConQueryOptions;
+
+    // Delete arrays.
+    delete iRealAddress;
+    delete iAliases;
+
+    // Delete Phone Contact Finder objects if owned.
+    if ( iOwnMatcher )
+        {
+        delete iPhCntMatcher;
+        delete iPhCntFactory;
+        }
+
+    if( iMessageSender )
+        {
+        delete iMessageSender;
+        }
+
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiGlnActiveObject::ReconQueryOptionsArray
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+CCaUiTIntArray* CCaUiGlnActiveObject::ReconQueryOptionsArray()
+    {
+    return iReConQueryOptions;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiGlnActiveObject::DoCancel
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiGlnActiveObject::DoCancel()
+    {
+    iObserver = NULL;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiGlnActiveObject::RunL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiGlnActiveObject::RunL()
+    {
+    CAUILOGSTRING("CALLUI: >>> CCaUiGlnActiveObject::RunL() Begin");
+    
+    MCaUiReconnectQueryObserver::TCaUiReconType recontype = 
+        MCaUiReconnectQueryObserver::ECallUiReconTypeCancel;
+    TInt result = iStatus.Int();
+    TInt count = ReconQueryOptionsArray()->Count();
+
+    // If some option was chosen, change the result to contain right value.
+    if ( result >= 0 && result <= count )
+        {
+        result = ( *ReconQueryOptionsArray() )[ result ];
+        }
+    else
+        {
+        result = KErrCancel;
+        }
+        
+    CAUILOGSTRING2("CALLUI: CCaUiGlnActiveObject::RunL(): result: %d", result);    
+    switch ( result )
+        {
+        case ECaUiVoiceCall:
+            recontype = MCaUiReconnectQueryObserver::ECallUiReconTypeVoice;
+            break;
+
+        case ECaUiVideoCall:
+            recontype = MCaUiReconnectQueryObserver::ECallUiReconTypeVideo;
+            break;
+#ifndef RD_UNIFIED_EDITOR
+        case ECaUiMms:
+            CAUILOGSTRING("CALLUI: <<< CCaUiGlnActiveObject::RunL() ECaUiMms");
+            recontype = MCaUiReconConfQueryObserver::ECallUiReconTypeMms;
+            LaunchEditorL( ECaUiEditorMMS );
+            break;
+
+        case ECaUiSms:
+            CAUILOGSTRING("CALLUI: <<< CCaUiGlnActiveObject::RunL() ECaUiSms");
+            recontype = MCaUiReconConfQueryObserver::ECallUiReconTypeSms;
+            LaunchEditorL( ECaUiEditorSMS );
+            break;
+#else // RD_UNIFIED_EDITOR
+        case ECaUiMsg:
+            CAUILOGSTRING("CALLUI: <<< CCaUiGlnActiveObject::RunL() ECaUiMsg");
+            recontype = MCaUiReconnectQueryObserver::ECallUiReconTypeMsg;
+            LaunchEditorL( ECaUiEditorMSG );
+            break;
+#endif // RD_UNIFIED_EDITOR
+        default:
+            break;
+        }
+
+    iObserver->OptionSelected( recontype );
+    
+    Cancel();
+    
+    CAUILOGSTRING("CALLUI: <<< CCaUiGlnActiveObject::RunL() end");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiGlnActiveObject::SetActive
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiGlnActiveObject::SetActive()
+    {
+    if( !IsActive() )
+        {
+        CActive::SetActive();
+        }
+    }
+
+// ---------------------------------------------------------
+// CCaUiGlnActiveObject::CreateMessageSenderL
+// ---------------------------------------------------------
+//
+void CCaUiGlnActiveObject::CreateMessageSenderL()
+    {
+    // Create instance of send ui.
+    if( !iMessageSender )
+        {
+        iMessageSender = CCaUiMessageSender::NewL();
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiGlnActiveObject::LaunchEditorL
+// -----------------------------------------------------------------------------
+//
+void CCaUiGlnActiveObject::LaunchEditorL( TCaUiEditorType aEditorType )
+    {
+    CAUILOGSTRING("CALLUI: >>> CCaUiGlnActiveObject::LaunchEditorL()");
+    
+    CreateMessageSenderL();
+     
+    const CUidNameArray& msgTypes = iMessageSender->MessageTypesArrayL();   
+
+    if ( !( iAliases->Count() ) )
+        {
+        // Name not yet known, so try to solve it.
+        MPhCntMatch* match = NULL;
+        TInt ret = iPhCntMatcher->MatchNumber( 
+            match, 
+            ( *iRealAddress )[0] ); // First and only phonenumber.
+        CleanupStack::PushL( match );
+    
+        if ( ret == KErrNone && match )
+            {
+            HBufC* cliText = NULL;
+
+            MPhCntMatch::TCliType cliType = match->Cli( cliText );
+            CleanupStack::PushL( cliText );
+
+            if ( cliType == MPhCntMatch::ECliName )
+                {
+                iAliases->AppendL( *cliText );
+                }
+            CleanupStack::PopAndDestroy( cliText );
+            }
+
+        // Pop and destroy match.
+        CleanupStack::Pop( match );
+        if ( match )
+            {
+            match->Release();
+            }
+        }
+
+
+    TInt messageType = 0; // Editor type, default value.
+    TBool launchQuery = EFalse;
+
+    switch ( aEditorType )
+        {
+ #ifndef RD_UNIFIED_EDITOR
+        case ECaUiEditorSMS:
+            messageType = msgTypes[ ECaUiEditorSMS ].iUid.iUid;  // SMS editor.
+            launchQuery = ETrue;
+            break;
+
+        case ECaUiEditorMMS:
+            messageType = msgTypes[ ECaUiEditorMMS ].iUid.iUid;  // MMS editor.
+            launchQuery = ETrue;
+            break;
+ #else // RD_UNIFIED_EDITOR          
+        case ECaUiEditorMSG:
+            messageType = msgTypes[ ECaUiEditorMSG ].iUid.iUid;  // Unified message editor.
+            launchQuery = ETrue;
+            break;
+ #endif // RD_UNIFIED_EDITOR
+        default:
+            break;
+        }
+
+    CAUILOGSTRING2("CALLUI: CCaUiGlnActiveObject::LaunchEditorL(): Message type: %d", messageType);
+    CAUILOGSTRING2("CALLUI: CCaUiGlnActiveObject::LaunchEditorL(): Launch query: %d", launchQuery);
+
+    // If the editor type was valid, launch the editor.
+    if ( launchQuery )
+        {
+        //Launch SMS Editor.
+        iMessageSender->CreateNewMessageL( 
+            messageType, 
+            iRealAddress, 
+            iAliases,
+            NULL );
+        }
+        
+    CAUILOGSTRING("CALLUI: <<< CCaUiGlnActiveObject::LaunchEditorL()");    
+    }
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// CCaUiNoteActiveObject::CCaUiNoteActiveObject
+// 
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CCaUiNoteActiveObject::CCaUiNoteActiveObject()
+:   CActive( EPriorityStandard )
+    {
+    CActiveScheduler::Add( this );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiNoteActiveObject::NewL
+// 
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiNoteActiveObject* CCaUiNoteActiveObject::NewL()
+    {
+    CCaUiNoteActiveObject* self = new( ELeave ) CCaUiNoteActiveObject ();
+
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiNoteActiveObject::~CCaUiNoteActiveObject
+// 
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiNoteActiveObject::~CCaUiNoteActiveObject()
+    {
+    Cancel();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiNoteActiveObject::DoCancel
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiNoteActiveObject::DoCancel()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiNoteActiveObject::RunL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiNoteActiveObject::RunL()
+    {
+    Cancel();
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CCaUiNoteActiveObject::SetActive
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiNoteActiveObject::SetActive()
+    {
+    if( !IsActive() )
+        {
+        CActive::SetActive();
+        }
+    }
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiengine/cauidialdatacontainer.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Contains PhoneClient Dial Data.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include    "cauidialdatacontainer.h" 
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialDataContainer::CCaUiDialDataContainer
+// 
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CCaUiDialDataContainer::CCaUiDialDataContainer()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialDataContainer::NewL
+// 
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiDialDataContainer* CCaUiDialDataContainer::NewL()
+    {
+    CCaUiDialDataContainer* self = new( ELeave ) CCaUiDialDataContainer;
+
+    return self;
+    }
+
+    
+// -----------------------------------------------------------------------------
+// CCaUiDialDataContainer::~CCaUiDialDataContainer
+// 
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiDialDataContainer::~CCaUiDialDataContainer()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialDataContainer::DialData
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+TPhCltExtPhoneDialData& CCaUiDialDataContainer::DialData()
+    {
+    return iDialData;
+    }
+
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiengine/cauidialogs.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,658 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Implementation of CallUIEngine.
+*
+*/
+
+
+// INCLUDES
+
+#include <e32base.h>
+#include <e32cmn.h>
+#include <featmgr.h>
+#include <stringloader.h> 
+#include <callui.rsg> // Resources. 
+#include <aknmessagequerydialog.h>
+#include <aknnotewrappers.h>
+#include <akngloballistquery.h> 
+#include <aknglobalnote.h> 
+#include <mcauireconnectqueryobserver.h>
+#include "cauidialogs.h" 
+#include "cauilogger.h" 
+#include "cauiquery.h" 
+#include "cauiengine.h" 
+#include "cphcntmatcher.h" 
+#include "cauiactiveobject.h" 
+
+// CLASS DECLARATION
+
+/**
+*  Container for informatioin needed in Reconnection query.
+*
+*  @lib CaUiEngine.lib
+*  @since 2.6
+*/
+NONSHARABLE_CLASS( CCaUiReConQueryInformation ) 
+    : public CBase
+    {
+    public:  // Constructors and destructor
+        
+        /**
+        * C++ constructor.
+        * 
+        * @see CCaUiEngApi::LaunchNoteAndReconConfQueryL().
+        */
+        CCaUiReConQueryInformation(
+            MCaUiReconnectQueryObserver& aObserver,
+            CPhCntMatcher* aPhCntMatcher,
+            const TPtrC aPhoneNumber,
+            const TBool aIncludeVideoCallOption,
+            const TPtrC aNoteText );
+        
+        /**
+        * Destructor.
+        */
+        ~CCaUiReConQueryInformation();
+
+
+    public:    // Data
+
+        // Observer storage.
+        MCaUiReconnectQueryObserver&    iObserver;
+
+        // Matcher storage.
+        CPhCntMatcher*                  iPhCntMatcher;
+
+        // Phone number storage.
+        const TPtrC                     iPhoneNumber;
+
+        // Video call option storage.
+        const TBool                     iIncludeVideoCallOption;
+    
+        // The name corresponding the phone number.
+        const TPtrC                     iAlias;
+
+    };
+
+
+// -----------------------------------------------------------------------------
+// CCaUiReConQueryInformation::CCaUiReConQueryInformation
+// 
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CCaUiReConQueryInformation::CCaUiReConQueryInformation(
+    MCaUiReconnectQueryObserver& aObserver,
+    CPhCntMatcher* aPhCntMatcher,
+    const TPtrC aPhoneNumber,
+    const TBool aIncludeVideoCallOption,
+    const TPtrC aAlias )
+    : iObserver( aObserver ),
+      iPhCntMatcher( aPhCntMatcher ),
+      iPhoneNumber( aPhoneNumber ),
+      iIncludeVideoCallOption( aIncludeVideoCallOption ),
+      iAlias( aAlias )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiReConQueryInformation::~CCaUiReConQueryInformation
+// 
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiReConQueryInformation::~CCaUiReConQueryInformation()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialogs::CCaUiDialogs
+// 
+//
+// -----------------------------------------------------------------------------
+//
+CCaUiDialogs::CCaUiDialogs( CCaUiEngine& aCaUiEngine )
+    : iCaUiEngine( aCaUiEngine )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialogs::NewL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+CCaUiDialogs* CCaUiDialogs::NewL( CCaUiEngine& aCaUiEngine )
+    {
+    CCaUiDialogs* self = new( ELeave ) CCaUiDialogs( aCaUiEngine );
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialogs::ConstructL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiDialogs::ConstructL()
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::ConstructL() Begin");
+    // Create reconnect query, not visible yet.
+    iReconListQuery = CAknGlobalListQuery::NewL();
+    
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::ConstructL() End");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialogs::~CCaUiDialogs
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+CCaUiDialogs::~CCaUiDialogs()
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::~CCaUiDialogs() Begin");
+    // Cancel confirmation query if exists.
+    CancelReconConfQuery();
+    delete iReconListQuery;
+    
+    // Delete reconnection query information.
+    delete iReConQueryInformation;
+    
+    // Cancel and delete note timer if exists.
+    if ( iNoteTimer )
+        {
+        iNoteTimer->Cancel();
+        delete iNoteTimer;
+        }
+
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::~CCaUiDialogs() End");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialogs::QueryVideoCallDefaultActionL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+TInt CCaUiDialogs::QueryVideoCallDefaultActionL()
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::QueryVideoCallDefaultActionL() Begin");
+    HBufC* vtstring = NULL;
+    HBufC* header = NULL;
+    vtstring = StringLoader::LoadLC( R_CALLUI_VT_SETTING_NOTE );
+    header = StringLoader::LoadLC( R_CALLUI_POPUP_VT_TITLE_SETTING );
+
+    CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL( *vtstring );
+    CleanupStack::PushL( dlg );
+    dlg->SetHeaderTextL( *header );
+    CleanupStack::Pop( dlg );
+
+    // Show query note to user
+    TInt result = dlg->ExecuteLD( R_CALLUI_VT_SETTING_QUERY );
+
+    CleanupStack::PopAndDestroy( 2, vtstring ); // header, vtstring
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::QueryVideoCallDefaultActionL() End");
+    
+    return result;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialogs::LaunchCreateListQueryL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CCaUiDialogs::LaunchCreateListQueryL( TPhCltCallType& aCallType )
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchCreateListQueryL() Begin");
+    
+    TInt choice = KErrNotFound;
+
+    CListMappingArray* mappingList = new ( ELeave ) CListMappingArray( 4 );
+    CleanupStack::PushL( mappingList ); 
+
+    // Create query dialog.
+    CCaUiCreateListQuery* dlg = 
+        new ( ELeave ) CCaUiCreateListQuery( &choice );
+    dlg->PrepareLC( R_CALLUI_CREATE_LIST_QUERY );
+    
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchCreateListQueryL() 1");
+
+    // new clean list item array
+    CDesCArray* textArray = new( ELeave ) CDesCArrayFlat( 4 );
+    CleanupStack::PushL( textArray );
+
+    FillListQueryItemsL( *textArray, *mappingList );
+
+    CleanupStack::Pop( textArray );
+
+    // Dialog takes the ownership of textArray          
+    if( textArray )
+        {
+        dlg->SetOwnershipType( ELbmOwnsItemArray );
+        dlg->SetItemTextArray( textArray );
+        }
+
+    // Highlight preferred item from listbox
+    if( aCallType == EPhCltVideo )
+        {
+        dlg->ListBox()->SetCurrentItemIndex( KCallUiVideoCall );
+        }
+
+    TBool ok = dlg->RunLD();
+    CAUILOGSTRING2("CALLUI: >>>CCaUiDialogs::LaunchCreateListQueryL() ok = %d", ok );
+    CAUILOGSTRING2("CALLUI: >>>CCaUiDialogs::LaunchCreateListQueryL() choice = %d", choice );
+    if ( ok  )
+        {
+        // Check what call type was selected.
+
+        // Dynamic list made because of voip support
+        // take calltype from mappinglist
+        aCallType = mappingList->At( choice ).iCallType;
+        }
+
+    CleanupStack::PopAndDestroy( mappingList );
+
+    return ok;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialogs::FillListQueryItemsL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiDialogs::FillListQueryItemsL( 
+    CDesCArray& aTextArray, 
+    CListMappingArray& aMappingList )
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::FillListQueryItemsL() Begin");
+    
+    // Pointer for strings to be loaded.
+    HBufC* bufPtr = NULL;
+    TInt index = 0;
+    TListMappingItem item;
+
+    // Voice call option.
+    bufPtr = StringLoader::LoadLC( R_CALLUI_CREATE_LIST_VOICE );
+    aTextArray.AppendL( *bufPtr );
+    CleanupStack::PopAndDestroy( bufPtr );  
+    bufPtr = NULL;
+    item.iIndex = index;
+    item.iCallType = EPhCltVoice;
+    aMappingList.AppendL( item );
+    index++;
+    
+     // Video call option.
+    if ( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) )
+        {
+        CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::FillListQueryItemsL() Adding video call option");
+        bufPtr = StringLoader::LoadLC( R_CALLUI_CREATE_LIST_VIDEO );
+        aTextArray.AppendL( *bufPtr );
+        CleanupStack::PopAndDestroy( bufPtr );
+        bufPtr = NULL;
+        item.iIndex = index;
+        item.iCallType = EPhCltVideo;
+        aMappingList.AppendL( item );
+        index++;
+        }
+    // Internet call option is shown if dynamic voip is set on
+    // and there are VoIP profiles defined
+    if( iCaUiEngine.IsVoIPProfiles() )
+        {
+        // Internet call option.
+        CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::FillListQueryItemsL() Adding internet call option");
+        bufPtr = StringLoader::LoadLC( R_CALLUI_CREATE_LIST_INTERNET );
+        aTextArray.AppendL( *bufPtr );
+        CleanupStack::PopAndDestroy( bufPtr );
+        bufPtr = NULL;
+        item.iIndex = index;
+        item.iCallType = EPhCltCallVoIP;
+        aMappingList.AppendL( item );
+        index++;
+        }
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::FillListQueryItemsL() End");
+    }
+
+
+/** not tested **/
+
+// -----------------------------------------------------------------------------
+// CCaUiDialogs::LaunchNoNetSupNoteL
+// 
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiDialogs::LaunchNoNetSupNoteL()
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchNoNetSupNoteL() Begin");
+    HBufC* string = StringLoader::LoadLC( R_CALLUI_NO_VIDEO_NETWORK );  
+
+    CAknInformationNote* dlg = new ( ELeave ) CAknInformationNote( EFalse );
+    dlg->ExecuteLD( *string );
+    dlg = NULL;
+
+    CleanupStack::PopAndDestroy( string );
+    string = NULL;
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchNoNetSupNoteL() End");
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialogs::LaunchReconConfQueryL
+// 
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiDialogs::LaunchReconConfQueryL( 
+    MCaUiReconnectQueryObserver& aObserver,
+    CPhCntMatcher* aPhCntMatcher,
+    const TPtrC aPhoneNumber,
+    const TBool aIncludeVideoCallOption,
+    const TPtrC aAlias )
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchReconConfQueryL() Begin ");
+    CDesCArray* textArray = new( ELeave ) CDesCArrayFlat( 4 );
+    CleanupStack::PushL( textArray );
+
+    // Delete the old query if exists.
+    CancelReconConfQuery();
+    
+    // Create new active object to handle query results.
+    iReconActObject = CCaUiGlnActiveObject::NewL( 
+        aObserver,
+        aPhCntMatcher,
+        aPhoneNumber,
+        aAlias );
+
+    CCaUiTIntArray* objectArray = iReconActObject->ReconQueryOptionsArray();
+    
+    // Pointer for strings to be loaded.
+    HBufC* bufPtr = NULL;
+
+    // Voice call option.
+    bufPtr = StringLoader::LoadLC( R_CALLUI_RECONNECT_LIST_ITEM_VOICE );
+    textArray->AppendL( *bufPtr );
+    CleanupStack::PopAndDestroy( bufPtr );
+    bufPtr = NULL;
+    objectArray->AppendL( CCaUiGlnActiveObject::ECaUiVoiceCall );
+
+    // Video call option is included only if it is wanted.
+    if ( aIncludeVideoCallOption )
+        {
+        bufPtr = StringLoader::LoadLC( R_CALLUI_RECONNECT_LIST_ITEM_VIDEO );
+        textArray->AppendL( *bufPtr );
+        CleanupStack::PopAndDestroy( bufPtr );
+        bufPtr = NULL;
+        objectArray->AppendL( CCaUiGlnActiveObject::ECaUiVideoCall );
+        }
+
+#ifndef RD_UNIFIED_EDITOR
+    // MMS option.
+    if (FeatureManager::FeatureSupported(KFeatureIdMMS))
+        {   
+        bufPtr = StringLoader::LoadLC( R_CALLUI_RECONNECT_LIST_ITEM_MMS  );
+        textArray->AppendL( *bufPtr );
+        CleanupStack::PopAndDestroy( bufPtr );
+        bufPtr = NULL;
+        objectArray->AppendL( CCaUiGlnActiveObject::ECaUiMms );
+        }
+
+    // SMS option.
+    bufPtr = StringLoader::LoadLC( R_CALLUI_RECONNECT_LIST_ITEM_SMS  );
+    textArray->AppendL( *bufPtr );
+    CleanupStack::PopAndDestroy( bufPtr );
+    bufPtr = NULL;
+    objectArray->AppendL( CCaUiGlnActiveObject::ECaUiSms );
+
+#else  
+    // Send message option.
+    bufPtr = StringLoader::LoadLC( R_CALLUI_RECONNECT_LIST_ITEM_MESSAGE  );
+    textArray->AppendL( *bufPtr );
+    CleanupStack::PopAndDestroy( bufPtr );
+    bufPtr = NULL;
+    objectArray->AppendL( CCaUiGlnActiveObject::ECaUiMsg );
+#endif // RD_UNIFIED_EDITOR
+
+    // Load query header.
+    bufPtr = StringLoader::LoadLC( R_CALLUI_RECONNECT_QUERY_HEADER  );
+    iReconListQuery->SetHeadingL( *bufPtr ); // Set query heading.
+    CleanupStack::PopAndDestroy( bufPtr );
+    bufPtr = NULL;
+
+    // Show query.
+    iReconActObject->SetActive();
+    iReconListQuery->ShowListQueryL( textArray, iReconActObject->iStatus );
+
+    CleanupStack::PopAndDestroy( textArray );
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchReconConfQueryL() End ");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialogs::CancelReconConfQuery
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiDialogs::CancelReconConfQuery()
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::CancelReconConfQuery() Begin ");
+    // Cancel the earlier query if exists.
+    if( iReconListQuery )
+        {
+        iReconListQuery->CancelListQuery();
+        }
+
+    // Cancel the active object.
+    if( iReconActObject )
+        {
+        if ( iReconActObject->IsActive() )
+            {
+            iReconActObject->Cancel();
+            }
+        }
+    iReconfQueryOngoing = EFalse;
+    delete iReconActObject;
+    iReconActObject = NULL;
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::CancelReconConfQuery() End ");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialogs::CancelNoteAndReconConfQuery
+// 
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiDialogs::CancelNoteAndReconConfQuery()
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::CancelNoteAndReconConfQuery() Begin ");
+    // Delete reconnection query information.
+    delete iReConQueryInformation;
+    iReConQueryInformation = NULL;
+
+    // Cancel Note timer if exists.
+    if ( iNoteTimer )
+        {
+        // Cancel note timer.
+        iNoteTimer->Cancel();
+        }
+
+    // Cancel the reconnect query if exists.
+    if( iReconListQuery )
+        {
+        iReconListQuery->CancelListQuery();
+        }
+
+    // Cancel the active object.
+    if( iReconActObject )
+        {
+        if ( iReconActObject->IsActive() )
+            {
+            iReconActObject->Cancel();
+            }
+        }
+
+    delete iReconActObject;
+    iReconActObject = NULL;
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::CancelNoteAndReconConfQuery() End ");
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialogs::LaunchNoteAndReconConfQueryL
+// 
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiDialogs::LaunchNoteAndReconConfQueryL( 
+    MCaUiReconnectQueryObserver& aObserver,
+    CPhCntMatcher* aPhCntMatcher,
+    const TPtrC aPhoneNumber,
+    const TBool aIncludeVideoCallOption,
+    const TPtrC aNoteText,
+    const TPtrC aAlias )
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchNoteAndReconConfQueryL() Begin ");
+    iReconfQueryOngoing = ETrue;
+    delete iReConQueryInformation;
+    iReConQueryInformation = NULL;
+    iReConQueryInformation = new ( ELeave ) CCaUiReConQueryInformation(
+        aObserver,
+        aPhCntMatcher,
+        aPhoneNumber,
+        aIncludeVideoCallOption,
+        aAlias );
+
+    HBufC* string = NULL;
+    TInt noteTextLength = aNoteText.Length();
+
+    // Use either given note string or the qtn.tel.no.video.network string.
+    if ( noteTextLength )
+        {
+        string = HBufC::NewLC( noteTextLength );
+        string->Des() = aNoteText;
+        }
+    else
+        {
+        string = StringLoader::LoadLC( R_CALLUI_NO_VIDEO_NETWORK );
+        }
+
+    if ( !iInfoNote )
+        {
+        iInfoNote = new ( ELeave ) CAknInformationNote( EFalse );
+        iInfoNote->SetTimeout( CAknNoteDialog::ELongTimeout );
+        iInfoNote->ExecuteLD( *string );
+        }
+    
+    // Start note wait timer.
+    if ( !iNoteTimer )
+        {
+        iNoteTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+        }
+    iNoteTimer->Cancel();
+    iNoteTimer->Start(
+        KCaUiEngNoteTimeout, 
+        KCaUiEngNoteTimeout,
+        TCallBack( DoPerformNoteLaunchCallBackL, this ) );
+
+    CleanupStack::PopAndDestroy( string );
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::LaunchNoteAndReconConfQueryL() End");
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CCaUiDialogs::DoPerformNoteLaunchCallBackL
+// 
+//
+// -----------------------------------------------------------------------------
+//
+TInt CCaUiDialogs::DoPerformNoteLaunchCallBackL( TAny* aAny )
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::DPNoteLaunchCallBackL() Begin");
+
+    CCaUiDialogs* self = static_cast< CCaUiDialogs* >( aAny );
+
+    if ( self )
+        {
+        if ( self->iNoteTimer )
+            {
+            // Cancel note timer.
+            self->iNoteTimer->Cancel();
+            }
+
+        if ( self->iInfoNote )
+            {
+            // Information note still displayed
+            return KErrNone;
+            }
+
+        if ( self->iReConQueryInformation && self->IsReconfQueryOngoing() )
+            {
+            // Launch reconnect query.
+            self->LaunchReconConfQueryL(
+                self->iReConQueryInformation->iObserver,
+                self->iReConQueryInformation->iPhCntMatcher,
+                self->iReConQueryInformation->iPhoneNumber,
+                self->iReConQueryInformation->iIncludeVideoCallOption,
+                self->iReConQueryInformation->iAlias );
+            }
+
+        delete self->iReConQueryInformation;
+        self->iReConQueryInformation = NULL;
+        }
+    CAUILOGSTRING("CALLUI: >>>CCaUiDialogs::DPNoteLaunchCallBackL() end");
+    return KErrNone;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::IsReconfQueryOngoing
+// 
+//
+// -----------------------------------------------------------------------------
+//
+TBool CCaUiDialogs::IsReconfQueryOngoing()
+    {
+    return iReconfQueryOngoing;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::IsReconfQueryOngoing
+// 
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiDialogs::SetReconfQueryOngoing( const TBool aOngoing )
+    {
+    iReconfQueryOngoing = aOngoing;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiengine/cauiengfactimpl.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Implementation of the CaUiEngine factory interface.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include    "cauiengfactimpl.h" 
+#include    "cauiengine.h" 
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngFactImpl::CCaUiEngApiLD
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+CCaUiEngApi* CCaUiEngFactImpl::CCaUiEngApiLD()
+    {
+    CleanupStack::PushL( this );
+
+    CCaUiEngine* caUiEng = CCaUiEngine::NewL();
+    CleanupStack::PopAndDestroy( this );
+    return caUiEng;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngFactImpl::~CCaUiEngFactImpl
+// 
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiEngFactImpl::~CCaUiEngFactImpl()
+    {
+    }
+
+
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// CreateCaUiEngFactoryL
+// 
+// Creates CallUIEngineFactory. This is only exported function.
+// Returns: CCaUiEngFactory*: CallUIEngine Factory instance.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CCaUiEngFactory* CreateCaUiEngFactoryL()
+    {
+    return new ( ELeave ) CCaUiEngFactImpl;
+    }
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiengine/cauiengine.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,1392 @@
+/*
+* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Implementation of CallUIEngine.
+*
+*/
+
+
+// INCLUDE FILES
+#include    "cauiengine.h" 
+#include    "cauiquery.h" // CCaUiQuery. 
+#include    <mcauireconnectqueryobserver.h>  // MCaUiReconnectQueryObserver.
+#include    <callui.rsg> // Resources. 
+#include    <cphcltdialer.h> // CPhcltDialer. 
+#include    <cphonecntfactory.h>
+#include    <cphcntsingleitemfetch.h>
+#include    <aiwinternaldialdata.h>
+#include    <aiwservicehandler.h> 
+#include    <cphcltextphonedialdata.h> // CPhCltExtPhoneDialData 
+
+#include    "callui.loc"                // Localized strings.
+
+#include    <stringloader.h> // String Loader. 
+#include    <aknnotewrappers.h>         // CAknInformationNote.
+#include    <akngloballistquery.h> // CAknGloballistQuery. 
+#include    <featmgr.h>                 // FeatureManager.
+
+#include    <aknglobalconfirmationquery.h> // Confirmation query.
+
+#include    <phcltutils.h> // Character removal. 
+#include    <aiwcommon.h> // AIW dialdata. 
+
+#include    <networkhandlingdomainpskeys.h> 
+#include    <e32property.h>             // Pub&Sub functionality.
+
+#include    "cauivoipextension.h" // VoIP/SCCP profile store 
+
+#include    <centralrepository.h>
+#include    <settingsinternalcrkeys.h> 
+#include     "cauilogger.h" // Call Ui Logger 
+#include    <aknmessagequerydialog.h> 
+#include    <aknglobalnote.h>
+#include    <mphcntstoreloader.h>
+#include    <mvpbkcontactstore.h> 
+
+#include "cauidialogs.h" 
+
+// CONSTANTS
+
+// GSM Network.
+const TInt KCaUiEngGsmNetwork = ENWNetworkModeGsm;
+// WCDMA Network.
+const TInt KCaUiEngWcdmaNetwork = ENWNetworkModeWcdma;
+
+
+_LIT( KCallTypeUriParam, "call-type" );
+_LIT( KCallTypeVideo, "video" );
+_LIT( KSemiColon, ";" );
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::CCaUiEngine
+// 
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CCaUiEngine::CCaUiEngine()
+:   iResourceLoader( *CCoeEnv::Static() )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::ConstructL
+// 
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::ConstructL()
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiEngine::ConstructL() Begin");
+    // Sets up TLS, must be done before FeatureManager is used.
+    FeatureManager::InitializeLibL();
+
+    if ( CCoeEnv::Static() )
+        {
+        // Open CallUI resource file.
+        TFileName* name = new ( ELeave ) TFileName( KCallUIResFile );
+        CleanupStack::PushL( name );
+        User::LeaveIfError( iResourceLoader.Open( *name ) );
+        CleanupStack::PopAndDestroy( name );
+        }
+
+    // Get info is VoIP supported
+    iVoIPProfileHandler = CCaUiVoIPExtension::NewL();
+    iLongPressSet = ECaUiLongPressKeyNotSet;
+
+    iServiceSelector = CConvergedServiceSelector::NewL();
+
+    iDialogs = CCaUiDialogs::NewL( *this );
+    
+    CAUILOGSTRING("CALLUI: >>>CCaUiEngine::ConstructL() Complete");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::NewL
+// 
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiEngine* CCaUiEngine::NewL()
+    {
+    CCaUiEngine* self = new( ELeave ) CCaUiEngine;
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::~CCaUEngine
+// 
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiEngine::~CCaUiEngine()
+    {
+    delete iServiceSelector;
+    
+    // Delete VoIP extension if VoIP is supported
+    if ( iVoIPProfileHandler )
+        {
+        delete iVoIPProfileHandler;
+        }
+    
+    delete iEmergencyCall;      
+    delete iContactSelector;
+    delete iFactory;
+    delete iVTSettingQuery;
+
+    // Clear dial components.
+    ClearDialContents();
+
+    if ( CCoeEnv::Static() )
+        {
+        // Close resource loader.
+        iResourceLoader.Close();
+        }
+    // Delete the menubuffer.
+    delete iBuf;
+    iBuf = NULL;
+  
+    delete iVTString;
+    iVTString = NULL;
+
+    delete iContactStoreLoader;
+    delete iDialogs;
+    
+    // Frees the TLS! Must be done after FeatureManager is used.
+    FeatureManager::UnInitializeLib();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::DialL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::DialL(
+    MCaUiDialResultObserver& aObserver,
+    const TDesC8& aDialData,
+    const TCaUiCallType aCallType )
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiEngine::DialL() Begin");
+    iDialogs->SetReconfQueryOngoing( EFalse );
+    // If iPhCltDialer and iDialData exist, 
+    // destroy them and create new ones. This clears the dial data.
+    ClearDialContents();
+    iPhCltDialer = CPhCltExtPhoneBase::NewL( this );
+    iObserver = &aObserver;
+    iDialData = CPhCltExtPhoneDialData::NewL();
+   
+    CAiwInternalDialData* aiwDialData = CAiwInternalDialData::NewLC( aDialData );
+    
+    TPhCltTelephoneNumber  aiwTelNumber( aiwDialData->PhoneNumber() );
+    HBufC* uriParams = FindAndRipURIParametersL( aiwTelNumber );
+    CleanupStack::PushL( uriParams );
+    aiwDialData->SetPhoneNumberL( aiwTelNumber );
+    
+
+    // ConvertDialDataL overwrites, if given in aDialData
+    SetDialDataCallType( aCallType );
+    
+    // Convert AIW dial data to PhoneClient format.
+    ConvertDialDataL( *aiwDialData  );
+    
+    // Check if there has been a long press of Send key
+    if ( iDialData->InitiateCall() )
+        {
+        HandleLongPressOfSendKeyL();
+        }
+    
+    iDialData->SetSendKeyPressed( 
+        IsSendKeyPressed( aCallType, aiwDialData->CallType() ) );
+    
+
+    // By default call is made, unless user cancels the procedure.
+    TBool createCall = ETrue;
+
+    TPhCltCallType callType = iDialData->CallType();
+    
+    if ( aCallType == ECaUiCallTypeVoice )
+        {
+        iDialData->SetCallType( EPhCltVoice );
+        }
+    // If not forced video call is wanted, ask user to confirm it.
+    // ECaUiCallTypeUnknown indicates that the call is not made from options menu.
+    else if ( iDialData->CallType() == EPhCltVideo 
+                            && aCallType == ECaUiCallTypeUnknown )
+        {
+        // Get preferred call-type from URI params, it will be passed to
+        // list query and selected by default
+        callType = CallTypeFromUriParams( *uriParams );
+        // If query is canceled, then call is not made.
+        createCall = iDialogs->LaunchCreateListQueryL( callType );
+        // Set the call type, video must be forced
+        if ( EPhCltVideo == callType )
+            {
+            iDialData->SetCallType( EPhCltForcedVideo );
+            }
+        else
+            {
+            iDialData->SetCallType( callType );
+            }
+        }
+    else if ( aCallType == ECaUiCallTypeInternet )
+        {
+        iDialData->SetCallType( EPhCltCallVoIP );
+        }
+    else if ( aCallType == ECaUiCallTypeVideo )
+        {
+        // (Forced) video call must be created.
+        iDialData->SetCallType( EPhCltForcedVideo );
+        }
+        
+    CleanupStack::PopAndDestroy( uriParams );
+    
+    
+    
+    // If user did not Cancel query or query was not shown, 
+    // perform the dial operation.
+    if ( createCall )
+        {
+        if ( iDialData->ContactLink() != KNullDesC8() 
+            && !aiwDialData->PhoneNumber().Length() )
+            {
+
+            TBool storeLoaded 
+                = LaunchContactStoreLoadingL( iDialData->ContactLink() );
+            if ( storeLoaded )
+                {
+                // Launch address select.
+                // aCallType describes which selector is used. ( VoIP/PhoneNumber )
+                LaunchAddressSelectL( iDialData->ContactLink(), aCallType );
+                }
+            }
+        else 
+            {
+            PhoneClientDialL( NULL );
+            }
+        }
+    else
+        {
+        HandleDialL( KErrCancel );
+        }
+    
+    CleanupStack::PopAndDestroy( aiwDialData );
+    CAUILOGSTRING("CALLUI: >>>CCaUiEngine::DialL() End");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchNoNetSupNoteL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::LaunchNoNetSupNoteL()
+    {
+
+    iDialogs->LaunchNoNetSupNoteL();
+
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchReconConfQueryL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::LaunchReconConfQueryL( 
+    MCaUiReconnectQueryObserver& aObserver,
+    CPhCntMatcher* aPhCntMatcher,
+    const TPtrC aPhoneNumber,
+    const TBool aIncludeVideoCallOption )
+    {
+    // Empty pointer.
+    TPtrC ptrc;
+
+    iDialogs->LaunchReconConfQueryL(
+        aObserver,
+        aPhCntMatcher,
+        aPhoneNumber,
+        aIncludeVideoCallOption,
+        ptrc );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::CancelReconConfQuery
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::CancelReconConfQuery()
+    {
+
+    iDialogs->CancelReconConfQuery();
+
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchNoteAndReconConfQueryL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::LaunchNoteAndReconConfQueryL( 
+    MCaUiReconnectQueryObserver& aObserver,
+    CPhCntMatcher* aPhCntMatcher,
+    const TPtrC aPhoneNumber,
+    const TBool aIncludeVideoCallOption,
+    const TPtrC aNoteText )
+    {
+    // Empty pointer.
+    const TPtrC ptrc;
+
+    iDialogs->LaunchNoteAndReconConfQueryL( 
+        aObserver,
+        aPhCntMatcher,
+        aPhoneNumber,
+        aIncludeVideoCallOption,
+        aNoteText,
+        ptrc );
+
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::CancelNoteAndReconConfQuery
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::CancelNoteAndReconConfQuery()
+    {
+
+    iDialogs->CancelNoteAndReconConfQuery();
+
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchAddressSelectL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CCaUiEngine::LaunchAddressSelectL(
+    TDes& aTelNum, 
+    const TInt aContactId,
+    const TBool aVoIPAddressSelect )
+    {
+    TBool addressSelected( EFalse );
+    TCaUiCallType callType( ECaUiCallTypeVoice );
+
+    if ( aVoIPAddressSelect )
+        {
+        callType = ECaUiCallTypeInternet;
+        }
+    
+    addressSelected = LaunchAddressSelectL( aTelNum, aContactId, callType );
+
+    return addressSelected;
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::CancelAddressSelect
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::CancelAddressSelect()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// From MPhCntStoreLoaderObserver.
+// CCaUiEngine::ContactStoreLoadingCompleted
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::ContactStoreLoadingCompleted( 
+        MVPbkContactStore* /*aStore*/, TInt aErrorCode )
+    {
+    TInt result( aErrorCode );
+    
+    if ( KErrNone == result )
+        {
+        TCaUiCallType caUiCallType( ECaUiCallTypeUnknown );
+        ConvertPhCltCallType( iDialData->CallType(), caUiCallType );
+        
+        TRAP( result, 
+            LaunchAddressSelectL( iDialData->ContactLink(), caUiCallType ) );
+        }
+    
+    if ( KErrNone != result )
+        {
+        TRAP_IGNORE( HandleDialL( aErrorCode ) );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::HandleDialL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::HandleDialL( const TInt aStatus )
+    {
+    if ( iObserver )
+        {
+        iObserver->HandleDialResultL( aStatus );
+        }
+    if ( !iDialogs->IsReconfQueryOngoing() )
+        {
+        ClearDialContents();
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::OptionSelected
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::OptionSelected( TCaUiReconType aReconType )
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiEngine::OptionSelected() Begin");
+    if ( aReconType == ECallUiReconTypeVoice ||
+         aReconType == ECallUiReconTypeVideo )
+        {
+        // Call is wanted to be made. Do it only if Dial data exists.
+        if ( iDialData )
+            {
+          
+            iDialogs->SetReconfQueryOngoing( EFalse );
+
+            if( aReconType == ECallUiReconTypeVoice )
+                {
+                // Make sure that call type is correct, i.e. voice call.
+                iDialData->SetCallType( EPhCltVoice );
+                }
+            else
+                {
+                // Make sure that call type is correct, i.e. video call.
+                iDialData->SetCallType( EPhCltVideo );
+                }
+
+            TRAPD( err, iPhCltDialer->DialL( *iDialData ) );
+            if( err )
+                {
+                CAUILOGSTRING2("CALLUI: >>>CCaUiEngine DialL error = %d", err );
+                }
+            }
+        }
+    CAUILOGSTRING("CALLUI: >>>CCaUiEngine::OptionSelected() End");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::ConvertDialDataL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+
+void CCaUiEngine::ConvertDialDataL(
+    const CAiwInternalDialData& aAiwDialData )
+    {
+    // Telephony number.
+    iDialData->SetTelephoneNumber( aAiwDialData.PhoneNumber().Left( 
+        iDialData->TelephoneNumber().MaxLength() ) );
+
+    // Call type.
+    CAiwDialData::TCallType aiwCallType = aAiwDialData.CallType();
+    TPhCltCallType phCltCallType = EPhCltVoice;
+
+    // After this the call type should be correct one.
+    if ( aiwCallType == CAiwDialData::EAIWVideo )
+        {
+        phCltCallType = EPhCltVideo;
+        iDialData->SetCallType( phCltCallType );
+        }
+    else if ( aiwCallType == CAiwDialData::EAIWForcedVideo )
+        {
+        phCltCallType = EPhCltForcedVideo;
+        iDialData->SetCallType( phCltCallType );
+        }
+    else if ( aiwCallType == CAiwDialData::EAIWVoiP )
+        {
+        phCltCallType = EPhCltCallVoIP;
+        iDialData->SetCallType( phCltCallType );
+        }
+    else if ( aiwCallType == CAiwDialData::EAIWForcedCS )
+        {
+        phCltCallType = EPhCltVoice; 
+        iDialData->SetCallType( phCltCallType );
+        }
+    
+
+    // Name.
+    iDialData->SetNameL( aAiwDialData.Name().Left( 
+        iDialData->Name().MaxLength() ) );
+
+    // Contact link.
+    iDialData->SetContactLinkL( aAiwDialData.ContactLink() );
+
+    // Window group.
+    iDialData->SetWindowGroup( aAiwDialData.WindowGroup() );
+
+    // Redial.
+    iDialData->SetRedial( aAiwDialData.Redial() );
+
+    // Redial maximum duration.
+    iDialData->SetRedialMaximumDuration( aAiwDialData.RedialMaximumDuration() );
+
+    // Show number.
+    iDialData->SetShowNumber( aAiwDialData.ShowNumber() );
+
+    // Match.
+    iDialData->SetAllowMatch( aAiwDialData.AllowMatch() );
+
+    // End other calls.
+    iDialData->SetEndOtherCalls( aAiwDialData.EndOtherCalls() );
+
+    // Subaddress.
+    iDialData->SetSubAddressL( aAiwDialData.SubAddress().Left( 
+        iDialData->SubAddress().MaxLength() ) );
+
+    // SAT call.
+    iDialData->SetSATCall( aAiwDialData.SATCall() );
+
+    // Bearer.
+    iDialData->SetBearerL( aAiwDialData.Bearer().Left( 
+        iDialData->Bearer().MaxLength() ) );
+    
+    // Set Long keypress activity. ETrue if client wants to initate 
+    // voice/video call.
+    iDialData->SetInitiateCall( aAiwDialData.InitiateCall() );
+
+    if ( aAiwDialData.ServiceId() )
+        {
+        iDialData->SetServiceId( aAiwDialData.ServiceId() );
+        }
+    // Remove invalid chars.
+    if( iDialData->CallType() != EPhCltCallVoIP )
+
+        {
+        TPhCltTelephoneNumber telnum;
+        telnum.Zero();
+        telnum = iDialData->TelephoneNumber();
+        PhCltUtils::RemoveInvalidChars( telnum );
+
+        iDialData->SetTelephoneNumber( telnum );
+        }
+    iDialData->SetUUIL( aAiwDialData.UUI() );
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::ClearDialContents
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::ClearDialContents()
+    {
+    if ( iPhCltDialer )
+        {
+        delete iPhCltDialer;
+        iPhCltDialer = NULL;
+        }
+
+    if ( iDialData )
+        {
+        delete iDialData;
+        iDialData = NULL;
+        }
+
+    // Not owned, so just set to NULL.
+    iObserver = NULL;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::IsVoIPProfiles()
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CCaUiEngine::IsVoIPProfiles()
+    {
+    TBool isProfiles = EFalse;
+
+    TRAP_IGNORE( isProfiles = iVoIPProfileHandler->IsVoIPProfilesL() );
+      
+    return isProfiles; 
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::GetVoIPServiceIdsL()
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::GetVoIPServiceIdsL( RIdArray& aVoipServiceIds ) const
+    {
+    if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) )
+        {
+        iVoIPProfileHandler->GetVoIPServiceIdsL( aVoipServiceIds );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::GetVoipServiceNameL()
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::GetVoipServiceNameL( TServiceId aServiceId, TDes& aServiceName ) const
+    {
+    iVoIPProfileHandler->GetVoipServiceNameL( aServiceId, aServiceName );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchAddressSelectL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::LaunchAddressSelectL( 
+    const TDesC8& aContactLink,
+    const TCaUiCallType aCallType )
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiEngine::LaunchAddressSelectL() start");
+    if ( !iFactory )
+        {
+        iFactory = CreateCntFactoryL();
+        }
+    if ( !iContactSelector ) 
+        {
+        iContactSelector = iFactory->CreateContactDataSelectionL();
+        }
+    
+    CPhCntContactDataSelection::TCallType callType;
+   
+    // if aCallType is ECaUiCallTypeUnknown call is not intitated from Call ui menu
+    // so have to use iDialDataCallType 
+    if ( aCallType != ECaUiCallTypeUnknown )  
+        {
+        ConvertCaUiCallType( aCallType, callType );
+        }
+    else
+        {
+        ConvertDialDataCallType( callType );
+        }
+        
+    iContactSelector->Cancel();
+    iContactSelector->SelectPhoneNumberForCallL( aContactLink, 
+                                                 callType, *this );
+ 
+    CAUILOGSTRING("CALLUI: >>>CCaUiEngine::LaunchAddressSelectL() end");
+    }
+
+    
+//------------------------------------------------------------------------------
+// CCaUiEngine::FindAndRipURIParametersL()
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+HBufC* CCaUiEngine::FindAndRipURIParametersL( TDes& aNumber ) const
+    {
+    HBufC* buf = NULL;    
+    TInt offset = aNumber.Locate( TChar( KSemiColon()[0] ) );
+    if( offset > 0 ) // Separator is no allowed to be a first char
+        {
+        __ASSERT_ALWAYS( offset <= aNumber.Length(), 
+            User::Leave( KErrGeneral ) );
+        buf = aNumber.Mid( offset ).AllocL();         
+        aNumber.SetLength( offset );           
+        }
+    else
+        {
+        buf = HBufC::NewL( 0 );
+        }
+    return buf;    
+    }
+   
+//------------------------------------------------------------------------------
+// CBrowserTelService::CallTypeFromUriParams()
+// 
+// 
+// -----------------------------------------------------------------------------
+//  
+TPhCltCallType CCaUiEngine::CallTypeFromUriParams( 
+                                           const TDesC& aUriParams ) const
+    {
+    TPhCltCallType type( EPhCltVoice ); // Default type is voice call
+    
+    TPtrC value( ParamValue( KCallTypeUriParam, aUriParams ) );
+    if( value.CompareF( KCallTypeVideo ) == 0 ) // URIs are case-insensitive.
+        {
+        type = EPhCltVideo;
+        }
+    // Otherwise return default type
+    return type;
+    }
+    
+//------------------------------------------------------------------------------
+// CBrowserTelService::ParamValue()
+// 
+// 
+// -----------------------------------------------------------------------------
+//     
+TPtrC CCaUiEngine::ParamValue( const TDesC& aName, const TDesC& aUri ) const
+    {  
+    TInt startIndex = 0;
+    TInt offset = 0;
+    TPtrC pairTmp( KNullDesC()  );
+    TPtrC ret( KNullDesC() );
+    TBool found = EFalse;
+
+    if( aName.Length() > 0 )
+        {
+        while( startIndex < aUri.Length() && !found )
+            {
+            pairTmp.Set( FindNextParamValuePair( aUri, startIndex ) );
+            offset = pairTmp.FindF( aName ); // URIs are case-insensitive.
+            if( offset >= 0 && 
+              ( offset + aName.Length() + 1 < pairTmp.Length() ) )
+                {
+                ret.Set( pairTmp.Mid( offset + aName.Length() + 1 ) );
+                found = ETrue;
+                }
+            }
+        }
+        
+    return ret;    
+    }    
+   
+//------------------------------------------------------------------------------
+// CCaUiEngine::FindNextParamValuePair()
+// 
+// 
+// -----------------------------------------------------------------------------
+//   
+TPtrC CCaUiEngine::FindNextParamValuePair( const TDesC& aUri, 
+                                           TInt& aStartIndex ) const
+    {  
+    TInt offset = 0;
+    TPtrC tmp( KNullDesC() );
+    TPtrC ret( KNullDesC() );
+
+    tmp.Set( aUri.Mid( aStartIndex ) );
+    // Search start mark for new paramter.
+    offset = tmp.Find( KSemiColon );
+    if( offset >= 0 )
+        {
+        if( aStartIndex + offset + KSemiColon().Length() < aUri.Length() ) 
+            {
+            // Move start index
+            aStartIndex += offset + KSemiColon().Length();
+        
+            // Store descriptor after start mark
+            tmp.Set( aUri.Mid( aStartIndex ) );
+            
+            // Search end mark (semi-colon)
+            offset = tmp.Find( KSemiColon );
+            if ( offset >= 0 )
+                {
+                // If end mark was found store the param/value pair
+                ret.Set( tmp.Left( offset ) );
+                }
+            else
+                { 
+                // If end mark is not found, 
+                // the rest of descriptor belong to this parameter
+                ret.Set( tmp );
+                }      
+            }
+        }
+    
+    // Move start offset based on findings    
+    if( ret.Length() )
+        {
+        aStartIndex += ret.Length();
+        }
+    else
+        {
+        aStartIndex = aUri.Length();
+        }        
+
+    return ret;
+    }    
+
+// ---------------------------------------------------------
+//  CCaUiEngine::HandleFirstLongPressOfSendKeyL()
+// ---------------------------------------------------------
+//
+TBool CCaUiEngine::HandleFirstLongPressOfSendKeyL()
+    {
+    TBool set( EFalse );    
+    
+    TInt result = iDialogs->QueryVideoCallDefaultActionL();
+       
+    // Check user decision and set return value accordingly     
+    switch ( result )
+        {
+        case EAknSoftkeyYes: // from avkon.hrh
+            set = ETrue;
+            break;
+        case EAknSoftkeyNo:            
+            set = EFalse;
+            break;                                                           
+        default:        
+            set = EFalse;
+            break;
+        }    
+    return set;
+    }
+
+// ---------------------------------------------------------
+//  CCaUiEngine::HandleLongPressOfSendKeyL()
+// ---------------------------------------------------------
+//    
+void CCaUiEngine::HandleLongPressOfSendKeyL()
+    {
+        
+    // Check if the setting is already ON -> make a video call
+    if ( iLongPressSet == ECaUiLongPressKeyInUse )
+        {
+        // ON -> initiate a video call 
+        // (Forced) video call must be created
+        iDialData->SetCallType( EPhCltForcedVideo );
+        }
+    // Check if the setting is already OFF -> make a voice call
+    else if ( iLongPressSet == ECaUiLongPressKeyNotInUse )
+        {
+        // OFF -> initiate a voice call
+        // Voice call must be created
+        iDialData->SetCallType( EPhCltVoice );    
+        }
+    // If the setting has never been set, check what the user wants to do
+    else if ( iLongPressSet == ECaUiLongPressKeyNotSet )
+        {
+           // Ask from the user how long press of Send key should be handled
+        TBool set = HandleFirstLongPressOfSendKeyL();
+    
+        if ( set )
+            {
+            // User answered YES -> initiate a video call
+            // (Forced) video call must be created
+            iLongPressSet = ECaUiLongPressKeyInUse;
+            iDialData->SetCallType( EPhCltForcedVideo );
+            }
+        else
+            {
+            // User answered NO -> initiate a voice call
+            // Voice call must be created
+            iLongPressSet = ECaUiLongPressKeyNotInUse; 
+            iDialData->SetCallType( EPhCltVoice );
+            }              
+        }        
+    }
+
+// ---------------------------------------------------------
+//  CCaUiEngine::SelectionDone()
+// ---------------------------------------------------------
+//     
+void CCaUiEngine::SelectionDone( CPhCntSelectedData* aContactData, 
+                                  TInt aErrorCode )
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiEngine::SelectionDone() Start");
+    CAUILOGSTRING2("CALLUI: >>>SelectionDone() ECode = %d", aErrorCode );
+    if ( aErrorCode == KErrNone )
+        {
+        TPhCltTelephoneNumber phoneNumber;
+        HBufC8* fieldLink = NULL;
+        
+        if ( iDialData->TelephoneNumber() == KNullDesC )
+            {
+            phoneNumber = aContactData->Data();
+
+            // Do not remove illegal chars if call type is VOIP and
+            // call is made to a voip number
+            if ( !( EPhCltCallVoIP == iDialData->CallType() &&
+                    aContactData->NumberType()==MPhCntMatch::EVoipNumber ) )
+                {                    
+                PhCltUtils::RemoveInvalidChars( phoneNumber );
+                }                                    
+            iDialData->SetTelephoneNumber( phoneNumber );
+            }
+        if ( aContactData->FieldLink().Length() > 0 )
+            {
+            fieldLink = aContactData->FieldLink().Alloc();
+            }
+        
+        TRAP( aErrorCode, PhoneClientDialL( fieldLink ) );
+      
+        delete fieldLink;
+        fieldLink = NULL;
+        }
+        
+    if ( aErrorCode != KErrNone )
+        {
+        TRAP_IGNORE( HandleDialL( aErrorCode ) );
+        }            
+    CAUILOGSTRING("CALLUI: >>>CCaUiEngine::SelectionDone() End");
+    }
+// ---------------------------------------------------------
+//  CCaUiEngine::PhoneClientDialL()
+// ---------------------------------------------------------
+// 
+void CCaUiEngine::PhoneClientDialL( const TDesC8* aFieldLink )
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiEngine::DialL()::PhoneClient dial Start");
+    
+    TBool createCall( ETrue );
+    TInt error( KErrNone );
+    
+    if ( aFieldLink )
+        {
+        iDialData->SetContactLinkL( *aFieldLink );
+        }
+    
+    // Check if number is emergency number and if it is 
+    // then call emeregency call
+    if ( !iEmergencyCall )
+        {
+        iEmergencyCall = CPhCltEmergencyCall::NewL( this );
+        }
+    if ( IsEmergencyNumber() )
+        {
+        createCall = EFalse;
+        error = KErrNone;
+        iEmergencyCall->DialEmergencyCallL( iDialData->TelephoneNumber() );
+        }
+    
+    if ( createCall )
+        {
+        CConvergedServiceSelector::TSsResult results;
+        
+        error = iServiceSelector->GetCallingServiceByCallType( 
+                        results,
+                        ServiceSelectorCallType(),
+                        iDialData->ServiceId(),
+                        iDialData->SendKeyPressed(),
+                        iDialData->TelephoneNumber() );
+            
+        if ( KErrNone == error )
+            {
+            SetSelectorResults( results );
+            }
+        else
+            {
+            createCall = EFalse;
+            }
+        }
+    
+    // Here note launch + query if this is video call and we
+    // are not in 3G network.
+   
+    if ( createCall )
+        {
+        if ( ( iDialData->CallType() == EPhCltVideo ) ||
+             ( iDialData->CallType() == EPhCltForcedVideo ) )
+            {
+            if ( !IsVideoCallAllowedL() )
+                {
+                createCall = EFalse;
+                error = KErrCancel;
+                }
+            }
+        }
+    if ( createCall )
+        {
+        CAUILOGSTRING("CALLUI: >>>CCaUiEngine::DialL(): Call PhoneClientdial");
+        iPhCltDialer->DialL( *iDialData );
+        }
+    else 
+        {        
+        //User cancelled. Need to inform client.
+        if ( error != KErrNone ) // Emergency call does not need to inform client. 
+            {
+            HandleDialL( error );
+            }
+         }
+    CAUILOGSTRING("CALLUI: >>>CCaUiEngine::DialL()::PhoneClient dial End");
+    }
+    
+// ---------------------------------------------------------
+//  CCaUiEngine::SetDialDataCallType()
+// ---------------------------------------------------------
+// 
+void CCaUiEngine::SetDialDataCallType( const TCaUiCallType aCallType )
+    {
+    if ( aCallType == ECaUiCallTypeVoice )
+        {
+        // Voice call must be created.
+        iDialData->SetCallType( EPhCltVoice );
+        }
+    else if ( aCallType == ECaUiCallTypeVideo )
+        {
+        // (Forced) video call must be created.
+        iDialData->SetCallType( EPhCltForcedVideo );
+        }
+    else if ( aCallType == ECaUiCallTypeInternet )
+        {
+        // VoIP call must be created.
+        iDialData->SetCallType( EPhCltCallVoIP );
+        }
+    else
+        {
+        // else Voice call is ok.
+        iDialData->SetCallType( EPhCltVoice );
+        }
+    }
+    
+// ---------------------------------------------------------
+//  CCaUiEngine::IsEmergencyNumber()
+// ---------------------------------------------------------
+//
+TBool CCaUiEngine::IsEmergencyNumber()
+    {
+    TBool isEmergencyNumber( EFalse );
+    
+    // get phonenumber from iDialData and heck number using phoneclient
+    // emergencycall api
+    TInt result = iEmergencyCall->IsEmergencyPhoneNumber(
+        iDialData->TelephoneNumber(), 
+        isEmergencyNumber );
+   
+    return isEmergencyNumber;
+    }
+
+// ---------------------------------------------------------
+//  CCaUiEngine::IsVideoCallAllowedL()
+// ---------------------------------------------------------
+// 
+TBool CCaUiEngine::IsVideoCallAllowedL()
+    {
+    TInt err = KErrNone;
+    TInt createCall( ETrue );
+    TInt networkMode = KCaUiEngGsmNetwork; // Default: GSM.               
+    err = RProperty::Get( KPSUidNetworkInfo, 
+                          KNWTelephonyNetworkMode, 
+                          networkMode );     
+   
+    if ( err )
+        {
+        // Information is not ok, so assume that
+        // we are in GSM network.
+        networkMode = KCaUiEngGsmNetwork;
+        }
+    // check network status
+    TInt nwStatus = ENWStatusRegistrationUnknown;
+    RProperty::Get( KPSUidNetworkInfo, KNWRegistrationStatus, nwStatus );
+
+    // If we are not in WCDMA network, then it is not allowed 
+    // to create a video call.
+    if ( networkMode != KCaUiEngWcdmaNetwork )
+        {     
+        TInt automaticredial = 0;
+        
+        GetCenRepValueL( KCRUidTelephonySettings, KSettingsAutomaticRedial, automaticredial );        
+        
+        // if no network, fall back to voice call for proper error handling
+        if ( (FeatureManager::FeatureSupported( KFeatureIdAutoRedialForVideoCall ) && automaticredial)
+              || nwStatus == ENWStatusRegistrationUnknown
+              || nwStatus == ENWStatusNotRegisteredNoService
+              || nwStatus == ENWStatusNotRegisteredEmergencyOnly
+              || nwStatus == ENWStatusNotRegisteredSearching )
+            {
+            // fallback to voice when no network support to videocall
+            // handled in Phone.
+            }
+        else
+            {
+            createCall = EFalse;
+            // Video call can not be done.
+            // => Launch Note + Reconnect Query.
+
+            // Empty pointer.
+            TPtrC ptrc;
+
+            iDialogs->LaunchNoteAndReconConfQueryL( 
+                *this,
+                NULL,
+                iDialData->TelephoneNumber(),
+                EFalse,
+                ptrc,
+                iDialData->Name() );
+            }
+        }
+    return createCall;
+    }
+// ---------------------------------------------------------
+//  CCaUiEngine::HandleEmergencyDialL()
+// ---------------------------------------------------------
+//    
+void CCaUiEngine::HandleEmergencyDialL( const TInt aStatus )
+    {
+    if ( iObserver )
+        {
+        iObserver->HandleDialResultL( aStatus );
+        }
+    }
+// ---------------------------------------------------------
+//  CCaUiEngine::GetCenRepValue()
+// ---------------------------------------------------------
+// 
+void CCaUiEngine::GetCenRepValueL( 
+        const TUid& aUid, 
+        const TUint aId,
+        TInt& aValue ) const
+    {
+    CRepository* repository = CRepository::NewL( aUid );
+    TInt err = repository->Get( aId, aValue );
+     
+    delete repository;
+    repository = NULL;
+     
+    if ( err != KErrNotFound ) // KErrNotFound acceptable.
+        {
+        User::LeaveIfError( err );
+        }
+    }
+
+// ---------------------------------------------------------
+//  CCaUiEngine::ConvertCaUiCallType( )
+// ---------------------------------------------------------
+//    
+void CCaUiEngine::ConvertCaUiCallType( const TCaUiCallType aCallType,
+                    CPhCntContactDataSelection::TCallType& aResultCallType  )
+    {
+    switch ( aCallType )
+        {
+        case ECaUiCallTypeVoice:
+            {
+            aResultCallType = CPhCntContactDataSelection::ECallPhoneNumber;
+            break;
+            }
+        case ECaUiCallTypeVideo:
+            {
+            aResultCallType = CPhCntContactDataSelection::ECallVideoNumber;
+            break;
+            }
+        case ECaUiCallTypeInternet:
+            {
+            aResultCallType = CPhCntContactDataSelection::ECallVoip;
+            break;
+            }
+        default:
+            {
+            aResultCallType = CPhCntContactDataSelection::ECallPhoneNumber;
+            break;
+            }
+        }
+    }
+    
+// ---------------------------------------------------------
+//  CCaUiEngine::ConvertDialDataCallType()
+// ---------------------------------------------------------
+//    
+void CCaUiEngine::ConvertDialDataCallType( CPhCntContactDataSelection::TCallType& aResultCallType )
+    {
+    switch ( iDialData->CallType() )
+        {
+        case EPhCltVoice:
+            {
+            aResultCallType = CPhCntContactDataSelection::ECallPhoneNumber;
+            break;
+            }
+        case EPhCltVideo:
+        case EPhCltForcedVideo:
+            {
+            aResultCallType = CPhCntContactDataSelection::ECallVideoNumber;
+            break;
+            }
+        case EPhCltCallVoIP:
+            {
+            aResultCallType = CPhCntContactDataSelection::ECallVoip;
+            break;
+            }
+        default:
+            {
+            aResultCallType = CPhCntContactDataSelection::ECallPhoneNumber;
+            break;
+            }
+        }
+    }
+
+
+// ---------------------------------------------------------
+//  CCaUiEngine::ConvertPhCltCallType
+// ---------------------------------------------------------
+//    
+void CCaUiEngine::ConvertPhCltCallType( const TPhCltCallType aCallType,
+        TCaUiCallType& aResultCallType ) const
+    {
+    switch ( aCallType )
+        {
+        case EPhCltVoice:
+            {
+            aResultCallType = ECaUiCallTypeVoice;
+            break;
+            }
+        case EPhCltVideo:
+        case EPhCltForcedVideo:
+            {
+            aResultCallType = ECaUiCallTypeVideo;
+            break;
+            }
+        case EPhCltCallVoIP:
+            {
+            aResultCallType = ECaUiCallTypeInternet;
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+
+// ---------------------------------------------------------
+//  CCaUiEngine::ServiceSelectorCallType()
+// ---------------------------------------------------------
+//    
+CConvergedServiceSelector::TSsCallType CCaUiEngine::ServiceSelectorCallType() const
+    {
+    CConvergedServiceSelector::TSsCallType ret;
+    
+    switch ( iDialData->CallType() )
+        {
+        case EPhCltVoice:
+            {
+            ret = CConvergedServiceSelector::ESsVoiceCall;
+            break;
+            }
+        case EPhCltVideo:
+        case EPhCltForcedVideo:
+            {
+            ret = CConvergedServiceSelector::ESsVideoCall;
+            break;
+            }
+        case EPhCltCallVoIP:
+            {
+            ret = CConvergedServiceSelector::ESsVoipCall;
+            break;
+            }
+        default:
+            {
+            ret = CConvergedServiceSelector::ESsVoiceCall;
+            break;
+            }
+        }
+    
+    return ret;
+    }
+
+// ---------------------------------------------------------
+//  CCaUiEngine::SetSelectorResults()
+// ---------------------------------------------------------
+//    
+void CCaUiEngine::SetSelectorResults( 
+        CConvergedServiceSelector::TSsResult& aResults )
+    {
+    switch ( aResults.iCallType )
+        {
+        case CConvergedServiceSelector::ESsVoipCall:
+            {
+            iDialData->SetCallType( EPhCltCallVoIP );
+            break;
+            }
+        case CConvergedServiceSelector::ESsVideoCall:
+            {
+            iDialData->SetCallType( EPhCltForcedVideo );
+            break;
+            }
+        case CConvergedServiceSelector::ESsVoiceCall:
+        default:
+            {
+            iDialData->SetCallType( EPhCltVoice );
+            break;
+            }
+        }
+    
+    iDialData->SetServiceId( aResults.iServiceId );
+    }
+
+
+// ---------------------------------------------------------
+//  CCaUiEngine::LaunchContactStoreLoadingL
+// ---------------------------------------------------------
+//  
+TBool CCaUiEngine::LaunchContactStoreLoadingL( const TDesC8& aContactLink )
+    {
+    if ( !iFactory )
+        {
+        iFactory = CreateCntFactoryL();
+        }
+    
+    if ( !iContactStoreLoader )
+        {
+        iContactStoreLoader = iFactory->CreateContactStoreLoaderL();
+        }
+    
+    TBool isStoreLoaded( 
+        iContactStoreLoader->IsContactStoreLoaded( aContactLink ) );
+    if ( !isStoreLoaded )
+        {
+        iContactStoreLoader->LoadContactStoreL( aContactLink, *this );        
+        }
+    
+    return isStoreLoaded;
+    }
+
+// ---------------------------------------------------------
+//  CCaUiEngine::IsSendKeyPressed
+// ---------------------------------------------------------
+//
+TBool CCaUiEngine::IsSendKeyPressed( TCaUiCallType aCallType,
+        CAiwDialData::TCallType aAiwCallType ) const
+    {
+    TBool isSendKeyPressed( EFalse );
+    if ( CAiwDialData::EAIWForcedCS != aAiwCallType )
+        {
+        if ( ECaUiCallTypeUnknown == aCallType )
+            {
+            isSendKeyPressed = ETrue;
+            }
+        }
+    
+    return isSendKeyPressed;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiengine/cauienginemain.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Global functions for CaUiEngine.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include    <e32std.h>
+
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+
+// -----------------------------------------------------------------------------
+// E32Dll
+// 
+// Returns always KErrNone.
+// -----------------------------------------------------------------------------
+//
+GLDEF_C TInt E32Dll( TDllReason )
+    {
+    return KErrNone;
+    }
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiengine/cauienginestub.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,656 @@
+/*
+* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Implementation of CallUIEngine, stub version.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include    "cauiengine.h" 
+#include    "cauidialogs.h" 
+
+#include    <callui.rsg> // resources. 
+#include    <cphcltdialer.h> // cphcltdialer. 
+#include    <cphonecntfactory.h> 
+#include    <aiwinternaldialdata.h> 
+#include    <aiwservicehandler.h> 
+#include    <cphcltextphonedialdata.h> // cphcltextphonedialdata 
+
+#include    "callui.loc" // localized strings. 
+
+#include    <stringloader.h> // string loader. 
+#include    <featmgr.h> // featuremanager. 
+
+#include    <phcltutils.h> // character removal. 
+#include    <aiwcommon.h> // aiw dialdata. 
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::CCaUiEngine
+// 
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CCaUiEngine::CCaUiEngine()
+:   iResourceLoader( *CCoeEnv::Static() )
+#ifndef RD_PHONE_NG
+    ,iResourceLoaderPhoneApE( *CCoeEnv::Static() )
+#endif    
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::ConstructL
+// 
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::ConstructL()
+    {
+    // Sets up TLS, must be done before FeatureManager is used.
+    FeatureManager::InitializeLibL();
+
+    if( CCoeEnv::Static() )
+        {
+        // Open CallUI resource file.
+        TFileName* name = new ( ELeave ) TFileName( KCallUIResFile );
+        CleanupStack::PushL( name );
+        User::LeaveIfError( iResourceLoader.Open( *name ) );
+        CleanupStack::PopAndDestroy( name );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::NewL
+// 
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiEngine* CCaUiEngine::NewL()
+    {
+    CCaUiEngine* self = new( ELeave ) CCaUiEngine;
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::~CCaUEngine
+// 
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiEngine::~CCaUiEngine()
+    {
+    delete iContactSelector;
+    delete iFactory;
+
+    // Clear dial components.
+    ClearDialContents();
+
+    if( CCoeEnv::Static() )
+        {
+        // Close resource loader.
+        iResourceLoader.Close();
+        
+#ifndef RD_PHONE_NG
+        // Release PhoneAppEngine resources.
+        iResourceLoaderPhoneApE.Close();
+#endif
+        }
+    
+    // Delete the menubuffer.
+    delete iBuf;
+    iBuf = NULL;
+
+    // Frees the TLS! Must be done after FeatureManager is used.
+    FeatureManager::UnInitializeLib();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::GetResources
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::GetResources(
+    const TCaUiEngResource aResource,
+    TFileName& aResFile,
+    TInt& aResId )
+    {
+    aResFile = KCallUIResFile;
+    if ( aResource == ECaUiResOnlyInternet )
+        {
+        aResId = 0;
+        }
+    else
+        {
+        // Return pure voice menu item.
+        aResId = R_CALLUI_CALL_MENU;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::DialL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::DialL(
+    MCaUiDialResultObserver& aObserver,
+    const TDesC8& aDialData,
+    const TCaUiCallType aCallType )
+    {
+    TInt length = aDialData.Length();
+   
+    // If iPhCltDialer and iDialDataContainer exist, 
+    // destroy them and create new ones. This clears the dial data.
+    ClearDialContents();
+    iPhCltDialer = CPhCltExtPhoneBase::NewL( this );
+    iObserver = &aObserver;
+    
+    iDialData = CPhCltExtPhoneDialData::NewL();
+    CAiwInternalDialData* aiwDialData = CAiwInternalDialData::NewLC( aDialData );
+
+    // Convert AIW dial data to PhoneClient format.
+   
+    ConvertDialDataL( *aiwDialData );
+
+    iDialData->SetCallType( EPhCltVoice );
+    
+    //a call type is still unknown if the dialing is made via phonebook
+    //send key (doesn't use HandleMenuCmdL, check the call type in 
+    //aiwDialData to make sure if unknown is really unknown
+    //only do if call type unknown
+    TCaUiCallType callType = aCallType;
+    if ( callType == ECaUiCallTypeUnknown )
+        {
+        CAiwDialData::TCallType aiwCalltype = aiwDialData->CallType();
+        
+        switch ( aiwCalltype )
+           {
+           case CAiwDialData::EAIWVoice:
+                callType = ECaUiCallTypeVoice;
+                break;
+            case CAiwDialData::EAIWVideo:
+            case CAiwDialData::EAIWForcedVideo:
+                callType = ECaUiCallTypeVideo;
+                break;
+            case CAiwDialData::EAIWVoiP:
+                callType = ECaUiCallTypeInternet;
+                break;
+            default:
+                //already unknown
+                break;
+            }
+        }
+        
+    //aiwDialData not needed anymore, remove from stack
+    CleanupStack::PopAndDestroy( aiwDialData );
+
+    // If Contact link is provided fetch field link from Phone Book.
+    if ( iDialData->ContactLink() != KNullDesC8() )
+        {
+        // Launch address select.
+        // aCallType describes which selector is used. ( VoIP/PhoneNumber )
+        LaunchAddressSelectL( 
+                        iDialData->ContactLink(), 
+                        callType );
+        }
+    
+
+    else 
+        {
+        iPhCltDialer->DialL( *iDialData );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchNoNetSupNoteL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::LaunchNoNetSupNoteL()
+    {
+    User::Leave( KErrNotSupported );
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchReconConfQueryL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::LaunchReconConfQueryL( 
+    MCaUiReconnectQueryObserver& /*aObserver*/,
+    CPhCntMatcher* /*aPhCntMatcher*/,
+    const TPtrC /*aPhoneNumber*/,
+    const TBool /*aIncludeVideoCallOption*/ )
+    {
+    User::Leave( KErrNotSupported );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::CancelReconConfQuery
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::CancelReconConfQuery()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchNoteAndReconConfQueryL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::LaunchNoteAndReconConfQueryL( 
+    MCaUiReconnectQueryObserver& /*aObserver*/,
+    CPhCntMatcher* /*aPhCntMatcher*/,
+    const TPtrC /*aPhoneNumber*/,
+    const TBool /*aIncludeVideoCallOption*/,
+    const TPtrC /*aNoteText*/ )
+    {
+    User::Leave( KErrNotSupported );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::CancelNoteAndReconConfQuery
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::CancelNoteAndReconConfQuery()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchAddressSelectL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CCaUiEngine::LaunchAddressSelectL( 
+    TDes& aTelNum, 
+    const TInt aContactId,
+    const TBool aVoIPAddressSelect )
+    {
+    if ( aVoIPAddressSelect )
+        {
+        User::Leave( KErrNotSupported );
+        }
+
+    TBool addressSelected( EFalse );
+    TCaUiCallType callType( ECaUiCallTypeVoice );
+    
+    addressSelected = LaunchAddressSelectL( aTelNum, aContactId, callType );
+
+    return addressSelected;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::CancelAddressSelect
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::CancelAddressSelect()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// From MPhCntStoreLoaderObserver.
+// CCaUiEngine::ContactStoreLoadingCompleted
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::ContactStoreLoadingCompleted( 
+        MVPbkContactStore* /*aStore*/, TInt /*aErrorCode*/ )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::HandleDialL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::HandleDialL( const TInt aStatus )
+    {
+    if ( iObserver )
+        {
+        iObserver->HandleDialResultL( aStatus );
+        }
+    
+    ClearDialContents();
+    }
+    
+// -----------------------------------------------------------------------------
+// From base class MCaUiReconnectQueryObserver
+// -----------------------------------------------------------------------------
+//   
+void CCaUiEngine::OptionSelected( 
+    MCaUiReconnectQueryObserver::TCaUiReconType /*aReconType*/ )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::ConvertDialData
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::ConvertDialDataL(
+    const CAiwInternalDialData& aAiwDialData )
+    {
+    // Telephony number.
+    iDialData->SetTelephoneNumber( aAiwDialData.PhoneNumber().Left( 
+        iDialData->TelephoneNumber().MaxLength() ) );
+
+    // Call type.
+    CAiwDialData::TCallType aiwCallType = aAiwDialData.CallType();
+    TPhCltCallType phCltCallType = EPhCltVoice;
+
+    // After this the call type should be correct one.
+    if ( aiwCallType == CAiwDialData::EAIWVideo )
+        {
+        phCltCallType = EPhCltVideo;
+        iDialData->SetCallType( phCltCallType );
+        }
+    else if ( aiwCallType == CAiwDialData::EAIWForcedVideo )
+        {
+        phCltCallType = EPhCltForcedVideo;
+        iDialData->SetCallType( phCltCallType );
+        }
+    else if ( aiwCallType == CAiwDialData::EAIWVoiP )
+        {
+        phCltCallType = EPhCltCallVoIP;
+        iDialData->SetCallType( phCltCallType );
+        }
+
+     // Name.
+    iDialData->SetNameL( aAiwDialData.Name().Left( 
+        iDialData->Name().MaxLength() ) );
+
+    // Contact link.
+    iDialData->SetContactLinkL( aAiwDialData.ContactLink() );
+
+    // Window group.
+    iDialData->SetWindowGroup( aAiwDialData.WindowGroup() );
+
+    // Redial.
+    iDialData->SetRedial( aAiwDialData.Redial() );
+    
+    // Redial maximum duration.
+    iDialData->SetRedialMaximumDuration( aAiwDialData.RedialMaximumDuration() );
+
+    // Show number.
+    iDialData->SetShowNumber( aAiwDialData.ShowNumber() );
+
+    // Match.
+    iDialData->SetAllowMatch( aAiwDialData.AllowMatch() );
+
+    // End other calls.
+    iDialData->SetEndOtherCalls( aAiwDialData.EndOtherCalls() );
+
+    // Subaddress.
+    iDialData->SetSubAddressL( aAiwDialData.SubAddress().Left( 
+        iDialData->SubAddress().MaxLength() ) );
+
+    // SAT call.
+    iDialData->SetSATCall( aAiwDialData.SATCall() );
+
+    // Bearer.
+    iDialData->SetBearerL( aAiwDialData.Bearer().Left( 
+        iDialData->Bearer().MaxLength() ) );
+
+    TPhCltTelephoneNumber telnum;
+    telnum.Zero();
+    telnum = iDialData->TelephoneNumber();
+    PhCltUtils::RemoveInvalidChars( telnum );
+    iDialData->SetTelephoneNumber( telnum );
+
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::ClearDialContents
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::ClearDialContents()
+    {
+    if ( iPhCltDialer )
+        {
+        delete iPhCltDialer;
+        iPhCltDialer = NULL;
+        }
+
+    if ( iDialData )
+        {
+        delete iDialData;
+        iDialData = NULL;
+        }
+
+    // Not owned, so just set to NULL.
+    iObserver = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchAddressSelectL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::LaunchAddressSelectL( 
+    const TDesC8& aContactLink,
+    const TCaUiCallType aCallType )
+    {
+    if ( aCallType != ECaUiCallTypeVoice )
+        {
+        HandleDialL( KErrNotSupported );
+        }
+    
+    else
+        {
+        if ( !iFactory )
+            {
+            iFactory = CreateCntFactoryL();
+            }
+        if ( !iContactSelector ) 
+            {
+            iContactSelector = iFactory->CreateContactDataSelectionL();
+            }
+            
+        CPhCntContactDataSelection::TCallType callType;
+        
+        if ( aCallType == ECaUiCallTypeVoice )
+            {
+            callType = CPhCntContactDataSelection::ECallPhoneNumber;
+            }
+        else if ( aCallType == ECaUiCallTypeVideo )
+            {
+            callType = CPhCntContactDataSelection::ECallVideoNumber;
+            }
+        else if ( aCallType == ECaUiCallTypeInternet )
+            {
+            callType = CPhCntContactDataSelection::ECallVoip;
+            }
+        else
+            {
+            callType = CPhCntContactDataSelection::ECallPhoneNumber;
+            }
+            
+        iContactSelector->Cancel();
+        iContactSelector->SelectPhoneNumberForCallL( aContactLink, callType, *this );
+ 
+        }
+     
+    }
+
+// ---------------------------------------------------------
+//  CCaUiEngine::HandleEmergencyDialL()
+// ---------------------------------------------------------
+//    
+void CCaUiEngine::HandleEmergencyDialL( const TInt /*aStatus*/ )
+    {
+    // Do nothing
+    }
+
+// ---------------------------------------------------------
+//  CCaUiEngine::SelectionDone()
+// ---------------------------------------------------------
+//     
+void CCaUiEngine::SelectionDone( CPhCntSelectedData* aContactData, 
+                                  TInt aErrorCode )
+    {
+    if ( aErrorCode == KErrNone )
+        {
+        TPhCltTelephoneNumber phoneNumber;
+        HBufC8* fieldLink = NULL;
+        
+        if ( iDialData->TelephoneNumber() == KNullDesC )
+            {
+            phoneNumber = aContactData->Data();
+            PhCltUtils::RemoveInvalidChars( phoneNumber );
+            iDialData->SetTelephoneNumber( phoneNumber );
+            }
+        if ( aContactData->FieldLink().Length() > 0 )
+            {
+            fieldLink = aContactData->FieldLink().Alloc();
+            }
+        
+        TRAP( aErrorCode, PhoneClientDialL( fieldLink ) );
+      
+        delete fieldLink;
+        fieldLink = NULL;
+        }
+        
+    if ( aErrorCode != KErrNone )
+        {
+        TRAP_IGNORE( HandleDialL( aErrorCode ) );
+        }            
+    }
+    
+// ---------------------------------------------------------
+//  CCaUiEngine::PhoneClientDialL()
+// ---------------------------------------------------------
+// 
+void CCaUiEngine::PhoneClientDialL( const TDesC8* aFieldLink )
+    {
+    
+    TBool createCall( ETrue );
+    TInt error( KErrNone );
+    
+    if ( aFieldLink )
+        {
+        iDialData->SetContactLinkL( *aFieldLink );
+        }
+    
+    // Check if number is emergency number and if it is 
+    // then call emeregency call
+    if ( !iEmergencyCall )
+        {
+        iEmergencyCall = CPhCltEmergencyCall::NewL( this );
+        }
+    if ( IsEmergencyNumber() )
+        {
+        createCall = EFalse;
+        if ( aFieldLink )
+            {
+            error = KErrNone;
+            iEmergencyCall->DialEmergencyCallL( iDialData->TelephoneNumber() );
+            }
+        else
+            {
+            error = KErrNotSupported;
+            }
+        }
+    
+    // Here note launch + query if this is video call and we
+    // are not in 3G network.
+   
+    if ( createCall )
+        {
+        if ( ( iDialData->CallType() == EPhCltVideo ) ||
+             ( iDialData->CallType() == EPhCltForcedVideo ) ||
+             ( iDialData->CallType() == EPhCltCallVoIP ) )
+            {
+                createCall = EFalse;
+                error = KErrNotSupported;
+            }
+            
+        }
+    if ( createCall )
+        {
+        iPhCltDialer->DialL( *iDialData );
+        }
+    else 
+        {        
+        //User cancelled. Need to inform client.
+        if ( error != KErrNone ) // Emergency call does not need to inform client. 
+            {
+            HandleDialL( error );
+            }
+         }
+    }
+
+// ---------------------------------------------------------
+//  CCaUiEngine::IsEmergencyNumber()
+// ---------------------------------------------------------
+//
+TBool CCaUiEngine::IsEmergencyNumber()
+    {
+    TBool isEmergencyNumber( EFalse );
+    
+    // get phonenumber from iDialData and heck number using phoneclient
+    // emergencycall api
+    TInt result = iEmergencyCall->IsEmergencyPhoneNumber(
+        iDialData->TelephoneNumber(), 
+        isEmergencyNumber );
+   
+    return isEmergencyNumber;
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::IsVoIPProfiles()
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+TBool CCaUiEngine::IsVoIPProfiles()
+    {  
+    return EFalse; 
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiengine/cauimessagesender.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,342 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Launches Sendui Editor.
+*
+*/
+
+
+
+
+//  INCLUDES
+#include    "cauimessagesender.h" 
+
+#include    <coemain.h>         // CCoeEnv
+#include    <callui.rsg> // Resources. 
+
+#include    <msvids.h>          // KUidMsvLocalServiceMtmValue
+
+#include    <sendui.h>          // CSendAppUi, CSendUi
+#include    <cmessagedata.h> // Message data for CSendUi 
+#include    <featmgr.h>         // Feature manager
+#include    "cauilogger.h" // Call Ui Logger 
+
+// CONSTANTS
+// The reconnect query options granularity.
+#ifdef RD_UNIFIED_EDITOR
+const TInt KCaUiReConQueryOptionsArrayGranularity = 3;
+#else // RD_UNIFIED_EDITOR
+const TInt KCaUiReConQueryOptionsArrayGranularity = 4;
+#endif // RD_UNIFIED_EDITOR
+
+const TInt KMtmPop3Uid = 0x10001029;
+const TInt KMtmImap4Uid = 0x1000102a;
+const TInt KUidEmail = 0x10001028;
+const TInt KUidPostCard = 0x10207245; 
+
+// -----------------------------------------------------------------------------
+// CCaUiMessageSender::CCaUiMessageSender
+// 
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CCaUiMessageSender::CCaUiMessageSender()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiMessageSender::~CCaUiMessageSender
+// 
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiMessageSender::~CCaUiMessageSender()
+    {
+    
+    CAUILOGSTRING("CALLUI: >>> CCaUiMessageSender::~CCaUiMessageSender()");
+    
+    if ( iMsgTypes )
+        {
+        iMsgTypes->Reset();
+        delete iMsgTypes;
+        }
+
+    if( iSession ) 
+        {
+        iSession->Cancel();    
+        }
+    delete iSession;
+        
+    if( iSendUi ) 
+        {    
+        delete iSendUi;   
+        }
+        
+    CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::~CCaUiMessageSender()");    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiMessageSender::NewL
+// 
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiMessageSender* CCaUiMessageSender::NewL()
+    {
+    
+    CAUILOGSTRING("CALLUI: >>> CCaUiMessageSender::NewL()");
+    
+    CCaUiMessageSender* self = new( ELeave ) CCaUiMessageSender ();
+    
+    CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::NewL()");
+    
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::CreateNewMessageL
+// Create a new message of the given type, in the given location
+// ---------------------------------------------------------
+//
+void CCaUiMessageSender::CreateNewMessageL(
+    TInt aMessageType,
+    MDesC16Array* aRealAddress,
+    MDesC16Array* aAliases,
+    CRichText* aRichText )
+    {
+    
+    CAUILOGSTRING("CALLUI: >>> CCaUiMessageSender::CreateNewMessageL()");
+       
+    TRAPD( err, CreateSendUiL());
+    if ( err != KErrNone )
+        User::Leave( KErrGeneral );     
+    
+    //Launch message editor standalone
+    TUid mtmUid = { aMessageType };
+    
+    CMessageData* messageData = CMessageData::NewL();
+    CleanupStack::PushL( messageData );
+    if ( aRichText )
+        {
+        messageData->SetBodyTextL( aRichText );
+        }
+    
+    // Set real address and check if aliases exist
+    if ( aRealAddress )
+        {
+        TBool aAliasesExist = EFalse;
+        if ( aAliases &&
+             aAliases->MdcaCount() == aRealAddress->MdcaCount() )
+            {
+            aAliasesExist = ETrue;
+            }
+        for ( TInt i=0; i < aRealAddress->MdcaCount(); i++ )
+            {
+            if ( aAliasesExist )
+                {
+                messageData->AppendToAddressL(
+                    aRealAddress->MdcaPoint( i ),
+                    aAliases->MdcaPoint( i ) );
+                }
+            else
+                {
+                messageData->AppendToAddressL(
+                    aRealAddress->MdcaPoint( i ) );
+                }
+            }
+        }
+        
+    iSendUi->CreateAndSendMessageL( mtmUid, messageData, KNullUid, EFalse );
+    CleanupStack::PopAndDestroy(); // messageData
+    
+    CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::CreateNewMessageL()");
+    }
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::CreateSendUiL
+// ---------------------------------------------------------
+//
+void CCaUiMessageSender::CreateSendUiL()
+    {
+    CAUILOGSTRING("CALLUI: >>> CCaUiMessageSender::CreateSendUiL()");
+    
+    // Create instance of send ui.
+    if( !iSendUi )
+        {
+        iSendUi = CSendUi::NewL();
+        }
+        
+    CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::CreateSendUiL()");    
+    }
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::MessageTypesArray
+// ---------------------------------------------------------
+const CUidNameArray& CCaUiMessageSender::
+    MessageTypesArrayL()
+    {
+    
+    CAUILOGSTRING("CALLUI: >>> CCaUiMessageSender::MessageTypesArrayL()");
+    
+    delete iMsgTypes;
+    iMsgTypes = NULL;
+
+    CUidNameArray* msgTypes = new ( ELeave ) 
+        CUidNameArray( KCaUiReConQueryOptionsArrayGranularity ); 
+    CleanupStack::PushL( msgTypes );
+    UpdateMessageTypesArrayL( msgTypes );
+    CleanupStack::Pop();
+    iMsgTypes = msgTypes;
+
+    CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::MessageTypesArrayL()");
+
+    return *iMsgTypes;
+    }
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::UpdateMessageTypesArrayL
+// Updates the array of UIDs which defines the MTM types for which the user
+// can create new messages.
+// ---------------------------------------------------------
+void CCaUiMessageSender::UpdateMessageTypesArrayL(
+    CUidNameArray* aMsgTypes )
+    {
+    
+    CAUILOGSTRING("CALLUI:>>> CCaUiMessageSender::UpdateMessageTypesArrayL()");
+    
+    aMsgTypes->Reset();
+
+    FeatureManager::InitializeLibL();
+    //Read MTM types from resource file
+    TResourceReader resReader;
+    CCoeEnv::Static()->CreateResourceReaderLC( resReader, 
+        NEW_MESSAGE_TYPES_ARRAY );
+    
+    TInt count = resReader.ReadInt16();
+
+    for ( TInt i = 0; i < count; i++ )
+        {
+        TInt32 id = resReader.ReadInt32();
+        HBufC* name = resReader.ReadHBufCL();
+        CleanupStack::PushL( name );
+
+        switch( id )
+            {
+            case KUidEmail:
+                {
+                if ( IsMailboxDefinedL() )
+                    {
+                    aMsgTypes->AppendL( TUidNameInfo( TUid::Uid( id ), *name ) );
+                    }
+                break;
+                }
+            case KUidPostCard:
+                {
+                if ( FeatureManager::FeatureSupported( KFeatureIdMmsPostcard ) )
+                    {
+                    aMsgTypes->AppendL( TUidNameInfo( TUid::Uid( id ), *name ) );
+                    }
+                break;
+                }
+            default:
+                {
+                aMsgTypes->AppendL( TUidNameInfo( TUid::Uid( id ), *name ) );
+                break;  
+                }
+            }
+            
+        CleanupStack::PopAndDestroy( name ); 
+        }
+    
+    CleanupStack::PopAndDestroy();//resReader 
+    FeatureManager::UnInitializeLib();
+    
+    CAUILOGSTRING("CALLUI:<<< CCaUiMessageSender::UpdateMessageTypesArrayL() end");
+    }
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::CreateMessageServiceConnectionL
+// ---------------------------------------------------------
+//
+void CCaUiMessageSender::CreateMessageServiceConnectionL()
+    {
+    CAUILOGSTRING("CALLUI:>>> CCaUiMessageSender::CreateMessageServiceConnectionL()");
+    
+    if ( !iSession )
+        {
+        iSession = CMsvSession::OpenSyncL( *this );
+        }
+    CAUILOGSTRING("CALLUI:<<< CCaUiMessageSender::CreateMessageServiceConnectionL()");    
+    }
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::IsMailboxDefinedL
+// ---------------------------------------------------------
+//
+TBool CCaUiMessageSender::IsMailboxDefinedL()
+    {
+    CAUILOGSTRING("CALLUI:>>> CCaUiMessageSender::IsMailboxDefinedL()");
+    
+    CreateMessageServiceConnectionL();
+    
+    TBool isDefined = EFalse;
+    CMsvEntry* root = iSession->GetEntryL( KMsvRootIndexEntryId );
+
+    TInt count = root->Count();
+    for ( TInt i = 0; i < count; i++ )
+        {
+        const TMsvEntry& tentry = (*root)[i];
+        if ( tentry.iMtm.iUid == KMtmPop3Uid || 
+            tentry.iMtm.iUid == KMtmImap4Uid )
+            {
+            isDefined = ETrue;
+            break;
+            }
+        }
+    delete root;
+    
+    CAUILOGSTRING("CALLUI:<<< CCaUiMessageSender::IsMailboxDefinedL()");
+    return isDefined;
+    }
+
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::HandleSessionEventL
+// ---------------------------------------------------------
+void CCaUiMessageSender::HandleSessionEventL(TMsvSessionEvent aEvent, 
+        TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/)
+    {
+    CAUILOGSTRING("CALLUI:>>> CCaUiMessageSender::HandleSessionEventL()");
+    
+    CreateMessageServiceConnectionL();
+
+    switch ( aEvent )
+        {
+        case EMsvCloseSession:
+            //Server close.
+            delete iSession;
+            iSession = NULL;
+            CAUILOGSTRING("CALLUI:<<< CCaUiMessageSender::HandleSessionEventL(): case: EMsvCloseSession");
+            break;
+        default:
+            CAUILOGSTRING("CALLUI:<<< CCaUiMessageSender::HandleSessionEventL(): case: default");
+            break;
+        }
+        
+    }
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiengine/cauimessagesenderstub.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Message sender stub
+*
+*/
+
+
+//  INCLUDES
+#include    "cauimessagesenderstub.h" 
+
+// -----------------------------------------------------------------------------
+// CCaUiMessageSender::CCaUiMessageSender
+// 
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CCaUiMessageSender::CCaUiMessageSender()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiMessageSender::~CCaUiMessageSender
+// 
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiMessageSender::~CCaUiMessageSender()
+    {   
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiMessageSender::NewL
+// 
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiMessageSender* CCaUiMessageSender::NewL()
+    {
+    CCaUiMessageSender* self = new( ELeave ) CCaUiMessageSender ();
+    
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::CreateNewMessageL
+// Create a new message of the given type, in the given location
+// ---------------------------------------------------------
+//
+void CCaUiMessageSender::CreateNewMessageL(
+    TInt /*aMessageType*/,
+    MDesC16Array* /*aRealAddress*/,
+    MDesC16Array* /*aAliases*/,
+    CRichText* /*aRichText*/ )
+    {
+    }
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::CreateSendUiL
+// ---------------------------------------------------------
+//
+void CCaUiMessageSender::CreateSendUiL()
+    {   
+    }
+
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::UpdateMessageTypesArrayL
+// Updates the array of UIDs which defines the MTM types for which the user
+// can create new messages.
+// ---------------------------------------------------------
+void CCaUiMessageSender::UpdateMessageTypesArrayL(
+    CUidNameArray* /*aMsgTypes*/ )
+    {
+    }
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::CreateMessageServiceConnectionL
+// ---------------------------------------------------------
+//
+void CCaUiMessageSender::CreateMessageServiceConnectionL()
+    {    
+    }
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::IsMailboxDefinedL
+// ---------------------------------------------------------
+//
+TBool CCaUiMessageSender::IsMailboxDefinedL()
+    {
+    TBool isDefined( EFalse );
+    return isDefined;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiengine/cauiquery.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,90 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Query that is used in asking call type (confirmation) 
+*                from user.
+*
+*/
+
+
+
+
+//  INCLUDES
+#include "cauiquery.h" 
+
+
+// -----------------------------------------------------------------------------
+// CCaUiCreateListQuery::CCaUiListQuery
+// 
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CCaUiCreateListQuery::CCaUiCreateListQuery( TInt* aIndex )
+:   CAknListQueryDialog( aIndex )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiCreateListQuery::~CCaUiCreateListQuery
+// 
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiCreateListQuery::~CCaUiCreateListQuery()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiCreateListQuery::OfferKeyEventL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+TKeyResponse CCaUiCreateListQuery::OfferKeyEventL(
+    const TKeyEvent& aKeyEvent,
+    TEventCode aType )
+    {
+    TKeyResponse response = EKeyWasConsumed;
+
+    if ( aType == EEventKeyDown )
+        {
+        // The first key event received will be a partial one, and will therefore be ignored.
+        iValidKeyEvent = ETrue;
+        }
+    
+    if ( iValidKeyEvent && aKeyEvent.iScanCode == EStdKeyYes )
+        {
+        if ( aType == EEventKey )
+            {
+            // The send key is specified to act (in Video Telephony UI specification) so that it 
+            // initiates the call. This means that the event is modified and faked to be a select
+            // key event, so that the list box can handle it correctly.
+            TKeyEvent keyEvent = aKeyEvent;
+            keyEvent.iCode = EKeyOK;
+            keyEvent.iScanCode = EStdKeyDevice3;
+            response = CAknListQueryDialog::OfferKeyEventL( keyEvent, EEventKey );
+            }
+        }
+    else
+        {
+        response = CAknListQueryDialog::OfferKeyEventL( aKeyEvent, aType );
+        }
+    
+    return response;
+    }
+
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiengine/cauivoipextension.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,159 @@
+/*
+* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  VoIP profile handler
+*
+*/
+
+
+
+// INCLUDE FILES
+#include    "cauivoipextension.h" 
+#include    <callui.rsg> 
+#include    <featmgr.h> 
+#include    <spsettings.h>
+#include    <spproperty.h>
+#include    <stringloader.h> // String Loader. 
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CCaUiVoIPExtension::CCaUiVoIPExtension
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CCaUiVoIPExtension::CCaUiVoIPExtension()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiVoIPExtension::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CCaUiVoIPExtension::ConstructL()
+    {    
+
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiVoIPExtension::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiVoIPExtension* CCaUiVoIPExtension::NewL()
+    {
+    CCaUiVoIPExtension* self = new( ELeave ) CCaUiVoIPExtension;
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    return self;
+    }
+
+    
+// Destructor
+CCaUiVoIPExtension::~CCaUiVoIPExtension()
+    {
+
+    }
+        
+// -----------------------------------------------------------------------------
+// CCaUiVoIPExtension::IsVoIPProfilesL()
+// Checks if any service supports internet call
+// -----------------------------------------------------------------------------
+//
+TBool CCaUiVoIPExtension::IsVoIPProfilesL()
+    {
+    TBool isProfiles = EFalse;
+
+    RIdArray voipServiceIds;
+    CleanupClosePushL( voipServiceIds );
+    GetVoIPServiceIdsL( voipServiceIds );
+    if ( voipServiceIds.Count() )
+        {
+        isProfiles = ETrue;
+        }
+    CleanupStack::PopAndDestroy( &voipServiceIds );
+          
+    return isProfiles; 
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiVoIPExtension::GetVoIPServiceIdsL()
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiVoIPExtension::GetVoIPServiceIdsL( RIdArray& aVoipServiceIds ) const
+    {
+    aVoipServiceIds.Reset();
+
+    // Fetch the settings api.
+    CSPSettings* settingsApi = CSPSettings::NewLC();               
+        
+    // read all service ids to array
+    RIdArray idArray;
+    CleanupClosePushL( idArray );
+        
+    if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) )
+        {
+        User::LeaveIfError( settingsApi->FindServiceIdsL( idArray ) );
+    
+        // go throught all the services and check if any
+        // of them supports internet call        
+        for ( TInt i = 0; idArray.Count() > i; i++)
+            {                        
+            // check if the service supports internet call                                                              
+            CSPProperty* property = CSPProperty::NewLC();
+            // get attribute mask of the service
+            User::LeaveIfError( settingsApi->FindPropertyL( idArray[i], 
+                EPropertyServiceAttributeMask, *property ) );
+            
+            // read the value of mask property
+            TInt mask = 0;                    
+            if ( KErrNone == property->GetValue( mask ) )
+                {
+                if ( ( mask & ESupportsInternetCall )
+                    && ( mask & EIsVisibleInCallMenu ) ) 
+                    {
+                    aVoipServiceIds.Append( idArray[i] );
+                    }
+                }
+            CleanupStack::PopAndDestroy( property );     
+            }                                   
+        }
+    CleanupStack::PopAndDestroy( 2, settingsApi );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiVoIPExtension::GetVoipServiceNameL()
+// 
+// -----------------------------------------------------------------------------
+//        
+void CCaUiVoIPExtension::GetVoipServiceNameL( TServiceId aServiceId, TDes& aServiceName ) const
+    {
+    CSPSettings* settingsApi = CSPSettings::NewLC();
+    CSPProperty* property = CSPProperty::NewLC();
+
+    settingsApi->FindPropertyL( aServiceId, EServiceName, *property );
+    User::LeaveIfError( property->GetValue( aServiceName ) );
+    
+    CleanupStack::PopAndDestroy( 2, settingsApi );
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiengine/ccauireconnectquery.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Creates CallUIEngine reconnect query implementation.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include    "ccauireconnectquery.h"
+#include    "ccauireconnectqueryimpl.h"
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CCaUiReconnectQuery::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CCaUiReconnectQuery* CCaUiReconnectQuery::NewL( 
+    MCaUiReconnectQueryObserver& aObserver )
+    {
+    return CCaUiReconnectQueryImpl::NewL( aObserver );
+    }
+
+CCaUiReconnectQuery::~CCaUiReconnectQuery()
+    {
+    // No implementation needed
+    }
+// -----------------------------------------------------------------------------
+// CCaUiReconnectQuery::CCaUiReconnectQuery
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CCaUiReconnectQuery::CCaUiReconnectQuery( MCaUiReconnectQueryObserver& aObserver )
+    : iObserver( aObserver )
+    {
+    }
+    
+
+
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiengine/ccauireconnectqueryimpl.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Implementation of CallUIEngine reconnect query.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include    "ccauireconnectqueryimpl.h"
+#include    "cauiengine.h" 
+
+CCaUiReconnectQueryImpl* CCaUiReconnectQueryImpl::NewL( 
+    MCaUiReconnectQueryObserver& aObserver )
+    {
+    CCaUiReconnectQueryImpl* self = 
+        new ( ELeave ) CCaUiReconnectQueryImpl( aObserver);
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop(); 
+    return self;
+    }
+    
+CCaUiReconnectQueryImpl::~CCaUiReconnectQueryImpl( )
+    {
+    if ( iEng )
+        {
+        iEng->CancelReconConfQuery();
+        delete iEng;
+        }
+    }
+    
+void CCaUiReconnectQueryImpl::ShowL( 
+    const TPtrC aPhoneNumber,
+    const TBool aIncludeVideoCallOption )
+    {
+    iEng->LaunchReconConfQueryL(iObserver,
+        NULL,
+        aPhoneNumber,
+        aIncludeVideoCallOption );
+    }
+
+void CCaUiReconnectQueryImpl::ConstructL()
+    {
+    iEng = CCaUiEngine::NewL();
+    }
+
+CCaUiReconnectQueryImpl::CCaUiReconnectQueryImpl(
+            MCaUiReconnectQueryObserver& aObserver ):
+                CCaUiReconnectQuery(aObserver)
+    {
+    
+    }
+
+// End of file
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiplugin/cauimain.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Global functions for CaUiPlugin.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include    <ecom.h>
+#include    <implementationproxy.h>
+#include    "caui.hrh" 
+#include    "cauiplugin.h" 
+
+
+// CONSTANTS
+
+// Holds implementation table.
+const TImplementationProxy KCallUIImplementationTable[] =
+    {
+    IMPLEMENTATION_PROXY_ENTRY( 
+        KCallUIImplementationUid, 
+        CCaUiPlugin::NewL ),
+    IMPLEMENTATION_PROXY_ENTRY( 
+        KCallUIImplementationUid2, 
+        CCaUiPlugin::NewL )        
+    };
+
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// ImplementationGroupProxy
+// 
+// Returns implementation table and updates aTableCount parameter to hold
+// amount of elements in table.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( 
+    TInt& aTableCount )
+    {
+    aTableCount = 
+        sizeof( KCallUIImplementationTable ) / 
+        sizeof( TImplementationProxy );
+
+    return KCallUIImplementationTable;
+    }
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/callui/src/cauiplugin/cauiplugin.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,441 @@
+/*
+* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Implementation of CallUI plugin.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include    "cauiplugin.h" // This class interface. 
+#include    "cauieng.h" // CaUiEngine. 
+#include    <aiwcommon.hrh> // AIW constants. 
+#include    "caui.hrh" // CallUI constants. 
+#include    <aiwmenu.h> // AIW Menu pane. 
+
+#include    <aiwservicehandler.h> 
+#include    <phclttypes.h> // PhoneClient types. 
+#include    "cauilogger.h" // Call Ui Logger 
+#include    <stringloader.h>
+#include    <callui.rsg>
+
+// CONSTANTS
+
+// Empty filename for initialization.
+_LIT( KCaUiNullResFile, "" );
+
+// The library to be loaded.
+_LIT( KCaUiLoadedLib, "cauiengine.dll" );
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CCaUiPlugin::CCaUiPlugin
+// 
+// C++ constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CCaUiPlugin::CCaUiPlugin()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiPlugin::ConstructL
+// 
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CCaUiPlugin::ConstructL()
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiPlugin::ConstructL() Begin");
+    User::LeaveIfError( iLibrary.Load( KCaUiLoadedLib ) );
+
+    // Call function CreateCaUiEngFactoryL()
+    TInt res = iLibrary.Lookup( 1 )();
+    CCaUiEngFactory* caUiEngFactory = 
+        reinterpret_cast< CCaUiEngFactory* >( res );
+
+    iCaUiEngine = caUiEngFactory->CCaUiEngApiLD();
+
+    if( !iCaUiEngine )
+        {
+        // Null returned, so leave.
+        User::Leave( KErrNotSupported );
+        }
+    CAUILOGSTRING("CALLUI: >>>CCaUiPlugin::ConstructL() End");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiPlugin::NewL
+// 
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiPlugin* CCaUiPlugin::NewL()
+    {
+    CCaUiPlugin* self = new( ELeave ) CCaUiPlugin;
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiPlugin::~CCaUiPlugin
+// 
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiPlugin::~CCaUiPlugin()
+    {
+    delete iCaUiEngine;
+
+    iLibrary.Close();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiPlugin::InitialiseL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiPlugin::InitialiseL(
+    MAiwNotifyCallback& /*aFrameworkCallback*/,
+    const RCriteriaArray& /*aInterest*/)
+    {
+    // Stub. Not used.
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiPlugin::HandleServiceCmdL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiPlugin::HandleServiceCmdL(
+    const TInt& aCmdId,
+    const CAiwGenericParamList& aInParamList,
+    CAiwGenericParamList& aOutParamList,
+    TUint aCmdOptions,
+    const MAiwNotifyCallback* aCallback )
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiPlugin::HandleServiceCmdL() Begin");
+    // Handle only call command.
+    if ( aCmdId == KAiwCmdCall )
+        {
+        if ( aCmdOptions & KAiwOptCancel )
+            {
+            CAUILOGSTRING("CALLUI: >>>CCaUiPlugin::HandleServiceCmdL() Cancel");
+            return;
+            }
+        // Check if there is CallUI Dialdata parameter.
+        TInt index = 0;
+        const TAiwGenericParam* genericParam = NULL; 
+            
+        genericParam = aInParamList.FindFirst( 
+            index,
+            EGenericParamCallDialData,
+            EVariantTypeDesC8 );
+            
+        if ( index >= 0 && genericParam )
+            {
+            // Get the data.
+            TPtrC8 ptr = genericParam->Value().AsData();
+
+            // If this function was called through HandleMenuCmdL,
+            // iMenuCmdId was set, otherwise it is zero.
+            TCaUiCallType callType = ECaUiCallTypeUnknown;
+
+            if ( iMenuCmdId == ECallUIVoice )
+                {
+                callType = ECaUiCallTypeVoice;
+                }
+            else if ( iMenuCmdId == ECallUIVideo )
+                {
+                callType = ECaUiCallTypeVideo;
+                }
+            else if ( iMenuCmdId == ECallUIInternet )
+                {
+                callType = ECaUiCallTypeInternet;
+                }
+
+            iMenuCmdId = 0;
+
+            // Save the parameters given.
+            iAiwNotifyCallback = aCallback;
+            iInParamList = &aInParamList;
+            iOutParamList = &aOutParamList;
+
+            // Perform the dial operation.
+            iCaUiEngine->DialL( *this, ptr, callType );
+            }
+        }
+    CAUILOGSTRING("CALLUI: >>>CCaUiPlugin::HandleServiceCmdL() End");
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CCaUiPlugin::InitializeMenuPaneL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiPlugin::InitializeMenuPaneL(
+    CAiwMenuPane& aMenuPane,
+    TInt aIndex,
+    TInt /* aCascadeId */,
+    const CAiwGenericParamList& aInParamList )
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiPlugin::InitializeMenuPaneL() Begin");
+
+    // By default we want all internet, voice and video call resources
+    TBool csVoiceMenuItemAvailable( ETrue );
+    TBool csVideoMenuItemAvailable( ETrue );
+    TBool voipMenuItemAvailable( ETrue );
+    
+    // If there is PhoneNumber parameter given, then only voice call 
+    // resource is wanted.
+    TInt count = aInParamList.Count();
+    if ( count )
+        {
+        TInt index = 0;
+        aInParamList.FindFirst(
+            index,
+            EGenericParamPhoneNumber,
+            EVariantTypeAny );
+
+        if ( index >= 0  )
+            {
+            csVideoMenuItemAvailable = EFalse;
+            voipMenuItemAvailable = EFalse;
+            }
+            
+        if ( index == KErrNotFound )
+            {
+            index = 0;    
+            aInParamList.FindFirst(
+                index,
+                EGenericParamSIPAddress,
+                EVariantTypeAny );
+
+            if ( index >= 0  )
+                {
+                // Internet number parameter was found, 
+                csVoiceMenuItemAvailable = EFalse;
+                csVideoMenuItemAvailable = EFalse;
+                }
+            }
+        }
+
+    // Add menu items
+
+    TInt menuIndex = aIndex;
+
+    if ( csVoiceMenuItemAvailable )
+         {
+         AddAiwMenuItemL( aMenuPane, menuIndex, ECSVoice );
+         menuIndex++;
+         }
+    
+    if ( csVideoMenuItemAvailable )
+        {
+        AddAiwMenuItemL( aMenuPane, menuIndex, ECSVideo );
+        menuIndex++;
+        }
+    
+    if ( voipMenuItemAvailable )
+        {
+        RIdArray voipServiceIds;
+        CleanupClosePushL( voipServiceIds );
+        iCaUiEngine->GetVoIPServiceIdsL( voipServiceIds );
+        TInt numberOfVoipServices = voipServiceIds.Count();
+        
+        if ( 1 == numberOfVoipServices )
+            {
+            // Single VoIP service, use service name in menu item
+             AddAiwMenuItemL( aMenuPane, menuIndex, EInternetWithName, voipServiceIds[0] );
+             menuIndex++;
+            }
+        else if ( numberOfVoipServices > 1 )
+            {
+            // Regular internet call menu
+            AddAiwMenuItemL( aMenuPane, menuIndex, EInternet );
+            menuIndex++;
+            }    
+
+        CleanupStack::PopAndDestroy( &voipServiceIds );
+        }
+
+    // Set submenu title
+    if ( csVoiceMenuItemAvailable ||
+         csVideoMenuItemAvailable || 
+         voipMenuItemAvailable )
+        {
+        HBufC* menuTitle = StringLoader::LoadLC( R_CALLUI_CALL_SUBMENU_TITLE );
+        aMenuPane.AddTitleItemL( *menuTitle, aIndex );
+        CleanupStack::PopAndDestroy( menuTitle );
+        }
+
+    CAUILOGSTRING("CALLUI: >>>CCaUiPlugin::InitializeMenuPaneL() End");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiPlugin::HandleMenuCmdL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiPlugin::HandleMenuCmdL(
+    TInt aMenuCmdId, 
+    const CAiwGenericParamList& aInParamList,
+    CAiwGenericParamList& aOutParamList,
+    TUint aCmdOptions,
+    const MAiwNotifyCallback* aCallback )
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiPlugin::HandleMenuCmdL() Begin");
+    // Handle only call commands.
+    if ( ( aMenuCmdId == ECallUIVideo ) || 
+         ( aMenuCmdId == ECallUIVoice ) ||
+         ( aMenuCmdId == ECallUIInternet ) )
+        {
+        // Save the menu command.
+        iMenuCmdId = aMenuCmdId;
+
+        // Menu commands are handled as service commands.
+        HandleServiceCmdL(
+            KAiwCmdCall,
+            aInParamList,
+            aOutParamList,
+            aCmdOptions,
+            aCallback );
+        }
+    CAUILOGSTRING("CALLUI: >>>CCaUiPlugin::HandleMenuCmdL() End");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiPlugin::HandleDialResultL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiPlugin::HandleDialResultL( const TInt aStatus )
+    {
+    CAUILOGSTRING("CALLUI: >>>CCaUiPlugin::HandleDialResultL() Start");
+    // If callback exists, inform client of call result.
+    if ( iAiwNotifyCallback )
+        {
+        // Add the call result to the out parameter list.
+        TAiwVariant variant( aStatus );
+        TAiwGenericParam genericParam( EGenericParamError, variant );
+        iOutParamList->AppendL( genericParam);
+
+        // R&D solution: Remove constness.
+        MAiwNotifyCallback* callback = 
+            const_cast< MAiwNotifyCallback* >( iAiwNotifyCallback );
+
+        // Notify client.
+        callback->HandleNotifyL(
+            KAiwCmdCall,
+            KAiwEventStarted,
+            *iOutParamList,
+            *iInParamList );
+        }
+
+    // Callback not active anymore, make clearing.
+    iAiwNotifyCallback = NULL;
+    iInParamList = NULL;
+    iOutParamList = NULL;
+    CAUILOGSTRING("CALLUI: >>>CCaUiPlugin::HandleDialResultL() End");
+    }
+
+// -----------------------------------------------------------------------------
+// CCaUiPlugin::AddAiwMenuItemL
+// 
+// 
+// -----------------------------------------------------------------------------
+//
+void CCaUiPlugin::AddAiwMenuItemL( CAiwMenuPane& aMenuPane, TInt aIndex, EMenuItemType aType, TServiceId aServiceId )
+    {
+    CEikMenuPaneItem::SData data;
+    data.iCascadeId = 0;
+    data.iFlags = 0;
+    data.iExtraText = KNullDesC();
+
+    HBufC* menuItemText = NULL;
+    
+    switch ( aType )
+        {
+        case ECSVoice:
+            {
+            data.iCommandId = ECallUIVoice;
+            menuItemText = StringLoader::LoadLC( R_CALLUI_CS_VOICE_CALL );
+            data.iText.Copy( *menuItemText );
+            break;
+            }
+
+        case ECSVideo:
+            {
+            data.iCommandId = ECallUIVideo;
+            menuItemText = StringLoader::LoadLC( R_CALLUI_CS_VIDEO_CALL );
+            data.iText.Copy( *menuItemText );
+            break;
+            }
+
+        case EInternet:
+            {
+            data.iCommandId = ECallUIInternet;
+            menuItemText = StringLoader::LoadLC( R_CALLUI_INTERNET_CALL );
+            data.iText.Copy( *menuItemText );
+            break;
+            }
+
+        case EInternetWithName:
+            {
+            data.iCommandId = ECallUIInternet;
+            
+            // Get the service provider name
+            TBuf<100> buf;
+            iCaUiEngine->GetVoipServiceNameL( aServiceId, buf );
+            menuItemText = StringLoader::LoadLC( R_CALLUI_XSP_CALL_WITH_SERVICE_NAME, buf );
+            data.iText.Copy( *menuItemText );
+            break;
+            }
+
+        default:
+            break;
+        }
+
+    if ( NULL != menuItemText )
+        {
+        CleanupStack::PopAndDestroy( menuItemText );
+        }
+    
+    aMenuPane.AddMenuItemL(
+       KAiwCmdCall,
+       data,
+       aIndex );
+    }
+
+// End of file
--- a/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdNoteController.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdNoteController.cpp	Fri May 14 16:24:46 2010 +0300
@@ -28,8 +28,6 @@
 _LIT(KFilename, "phcltsrvussd.ts");
 _LIT(KPath, "z://data");
 _LIT(KUssdRequesting, "txt_common_info_requesting"); // Requesting
-// Will be replaced by Hidden
-_LIT(KUssdRequestingQuit, "txt_ussd_button_exit"); // Quit
 _LIT(KUssdDone, "txt_ussd_dpopinfo_done"); // Done
 _LIT(KUssdNotDone, "txt_ussd_dpopinfo_not_done"); // NotDone
 _LIT(KUssdNotAllowed, "txt_ussd_dpopinfo_not_allowed"); //NotAllowed
@@ -195,7 +193,7 @@
     TFLOGSTRING("CPhCltUssdNoteController: DestroyGlobalWaitNote call")
     if ( iGlobalWaitNote )
         {
-        iGlobalWaitNote->Cancel();
+        iGlobalWaitNote->Close();
         delete iGlobalWaitNote;
         iGlobalWaitNote = NULL;
         delete iGlobalResource;
--- a/phonesrv_plat/converged_call_engine_api/inc/cccecallparameters.h	Mon May 03 13:01:45 2010 +0300
+++ b/phonesrv_plat/converged_call_engine_api/inc/cccecallparameters.h	Fri May 14 16:24:46 2010 +0300
@@ -87,7 +87,11 @@
         /** Gets the origin of the call. */
         virtual TCCECallOrigin Origin() const;
 
-
+        /** Sets the SAT alpha id identifying the text to be shown instead of number in         
+            call bubble */
+        virtual void SetAlphaId(TBuf<KCCPAlphaIdMaxSize> aAlphaId);
+        /** Gets the SAT alpha id of the call. */
+        virtual TBuf<KCCPAlphaIdMaxSize> AlphaId() const;
     
     protected:
        CCCECallParameters();
@@ -106,6 +110,8 @@
         TBuf<KCCESubAddressMaxSize> iSubAddress;
         /** Call origin.  */
         TCCECallOrigin iOrigin;
+        /** Alpha id.  */
+        TBuf<KCCPAlphaIdMaxSize> iAlphaId;
     
     };
 
--- a/phonesrv_plat/converged_call_provider_api/inc/ccpdefs.h	Mon May 03 13:01:45 2010 +0300
+++ b/phonesrv_plat/converged_call_provider_api/inc/ccpdefs.h	Fri May 14 16:24:46 2010 +0300
@@ -36,8 +36,9 @@
 const TUint KCCPPhoneSerialNumberSize = 50;        // 
 const TUint KCCPSysUtilVersionTextLength = 64;     // from sysutil.h
 const TUint KCCPPhoneModelIdSize = 50;             // from RMobilePhone::KPhoneModelIdSize
-const TUint KCCPPhoneManufacturerIdSize = 50;    // fromRMobilePhone::KPhoneManufacturerIdSize
+const TUint KCCPPhoneManufacturerIdSize = 50;      // fromRMobilePhone::KPhoneManufacturerIdSize
 const TUint KCCPUUSIdSize                = 129;    // etelmm.h, as KMaxUUISize
+const TUint KCCPAlphaIdMaxSize = 254;              // etelmm.h, as KAlphaIdMaxSize
 
 
 /**
--- a/phonesrv_plat/dialpad_api/inc/dialpadkeyhandler.h	Mon May 03 13:01:45 2010 +0300
+++ b/phonesrv_plat/dialpad_api/inc/dialpadkeyhandler.h	Fri May 14 16:24:46 2010 +0300
@@ -23,6 +23,7 @@
 class Dialpad;
 class DialpadVoiceMailboxEventFilter;
 class DialpadBluetoothEventFilter;
+class DialpadKeySequenceEventFilter;
 class HbMainWindow;
 
 #ifdef BUILD_DIALPADKEYHANDLER
@@ -49,9 +50,10 @@
     virtual ~DialpadKeyHandler();
 
 private:
-    DialpadVoiceMailboxEventFilter* mVmbxFilter;
-    DialpadBluetoothEventFilter* mBtFilter;
     HbMainWindow& mMainWindow;
+    QScopedPointer<DialpadVoiceMailboxEventFilter> mVmbxFilter;
+    QScopedPointer<DialpadBluetoothEventFilter> mBtFilter;
+    QScopedPointer<DialpadKeySequenceEventFilter> mKeySequenceFilter;
 };
 
 #endif // DIALPADKEYHANDLER_H
--- a/phonesrv_plat/voice_mailbox_number_api/inc/cvoicemailbox.h	Mon May 03 13:01:45 2010 +0300
+++ b/phonesrv_plat/voice_mailbox_number_api/inc/cvoicemailbox.h	Fri May 14 16:24:46 2010 +0300
@@ -32,7 +32,6 @@
  *  Parameter package for Voice Mailbox API operations.
  *
  *  @lib vmbxengine.lib
- *  @since S60 v5.2
  */
 class TVoiceMailboxParams
     {
@@ -171,7 +170,6 @@
     /**
      * Retrieves voice mailbox entry for the specified service.
      *
-     * @since S60 v5.2
      * @param in Params Service id and type of the mailbox for which
      *          a number/address should be defined.
      * @param out aEntry If successful, a new result container is
@@ -192,7 +190,6 @@
      * In that case unsupported arguments are ignored.
      * This method may display related UI notes or queries.
      *
-     * @since S60 v5.2
      * @param in aEntry The vmbx entry to save.
      * @return - KErrNone if the entry was saved
      *         - KErrNotSupported if not capable or allowed to execute this
@@ -214,7 +211,6 @@
      * can be used to check permissions.
      *
      *
-     * @since S60 v5.2
      * @param in aParams Service id and type of the mailbox for which
      *          a number/address should be defined.
      * @param out aEntry If successful, a new result container is
@@ -241,7 +237,6 @@
      * If client is interested, CheckConfiguration()
      * can be used to check permissions.
      *
-     * @since S60 v5.2
      * @param in aParams Service id and type of the mailbox.
      * @param out aEntry If successful, a new result container is
      *  created and ownership passed to the caller.
@@ -260,7 +255,6 @@
      * Displays a query on the screen asking the user to select a
      * Voice Mailbox service.
      *
-     * @since S60 v5.2
      * @param out aParams If successful,
      *          contains selected mailbox info.
      * @return - KErrNone if successful.
@@ -283,7 +277,6 @@
      *  if a second request is issued while one is active already.
      * Leaves if the notify request could not be served.
      *
-     * @since S60 v5.2
      * @param in aObserver The observer for the notification.
      * @param in aNotifyOnActiveLineOnly if this is ETrue, notify events will
      *        be generated only if the vmbx number of the active ALS line is
@@ -298,7 +291,6 @@
     /**
      * Cancels a notify request on a vmbx number change.
      *
-     * @since S60 v5.2
      */
     IMPORT_C virtual void NotifyVmbxNumberChangeCancel();
 
@@ -306,7 +298,6 @@
      * Checks the Voice Mailbox configuration to find out if a features
      * are disabled or enabled.
      *
-     * @since S60 v5.2
      * @param in aParams Specifies which mailbox capabilities,
      *          the caller wants to check.
      * @param in aFlags Use TVmbxFeatureCapabilityFlag values 
@@ -323,7 +314,6 @@
     /**
      * Checks the Voice Mailbox how many VoIP service Ids
      *
-     * @since S60 v5.2
      * @param out aProfileIds
      * @return KErrNone if get service Ids successfully.
      */
@@ -335,7 +325,6 @@
      * Some mailbox types may not support saving all arguments.
      * In that case unsupported arguments are ignored.
      *
-     * @since S60 v5.2
      * @param in aEntry The provisioned vmbx entry to save.
      * @return - KErrNone if the entry was saved
      *         - KErrNotSupported if not capable or allowed to execute this
@@ -350,14 +339,12 @@
     /**
      * Second phase constructor.
      *
-     * @since S60 v5.2
      */
     void ConstructL();
 
     /**
      * Default constructor.
      *
-     * @since S60 v5.2
      */
     CVoiceMailbox();
 
--- a/phonesrv_plat/voice_mailbox_number_api/inc/cvoicemailboxentry.h	Mon May 03 13:01:45 2010 +0300
+++ b/phonesrv_plat/voice_mailbox_number_api/inc/cvoicemailboxentry.h	Fri May 14 16:24:46 2010 +0300
@@ -24,7 +24,6 @@
 /**
  *  Container class for Voice Mailbox info.
  *  @lib vmbxengine.lib
- *  @since S60 v5.2
  */
 
 class CVoiceMailboxEntry : public CBase
@@ -45,7 +44,6 @@
 
     /**
      * Destructor
-     * @since S60 v5.2
      *
      */
     virtual ~CVoiceMailboxEntry();
@@ -53,7 +51,6 @@
     /**
      * Gets the Voice Mailbox service.
      *
-     * @since S60 v5.2
      * @return Mailbox service.
      */
     IMPORT_C virtual TServiceId ServiceId() const;
@@ -61,7 +58,6 @@
     /**
      * Sets the Voice Mailbox service to container.
      *
-     * @since S60 v5.2
      * @param in aVmbxServiceId Voice Mailbox service.
      */
     virtual void SetServiceId(
@@ -70,7 +66,6 @@
     /**
      * Gets the Voice Mailbox type.
      *
-     * @since S60 v5.2
      * @return Mailbox type.
      */
     IMPORT_C virtual TVmbxType VoiceMailboxType() const;
@@ -78,7 +73,6 @@
     /**
      * Sets the Voice Mailbox type to container.
      *
-     * @since S60 v5.2
      * @param in aVmbxType Voice Mailbox type.
      */
     IMPORT_C virtual void SetVoiceMailboxType(
@@ -87,7 +81,6 @@
     /**
      * Gets the Voice Mailbox line type.
      *
-     * @since S60 v5.2
      * @return Mailbox line type.
      *      EVmbxAlsLineDefault is returned if mailbox does not
      *      support several lines.
@@ -98,7 +91,6 @@
      * Sets the Voice Mailbox line type to container.
      * EVmbxAlsLineDefault is used by default.
      *
-     * @since S60 v5.2
      * @param in aLine Selected Voice Mailbox line type.
      */
     virtual void SetVmbxAlsLineType(
@@ -107,7 +99,6 @@
     /**
      * Gets the Voice Mailbox number or address.
      *
-     * @since S60 v5.2
      * @param out aVmbxNumber If successful, contains the returned 
      *   mailbox number or address.
      * @return One of the system wide error codes.
@@ -117,7 +108,6 @@
     /**
      * Sets the Voice Mailbox number or address to container.
      *
-     * @since S60 v5.2
      * @param in aVmbxNumber New Voice Mailbox number or address.
      * @return One of the system wide error codes.
      */
@@ -126,7 +116,6 @@
     /**
      * Gets the Voice Mailbox brand id.
      *
-     * @since S60 v5.2
      * @param out aBrandId If successful, contains the returned Brand id.
      * @return One of the system wide error codes.
      */
@@ -135,7 +124,6 @@
     /**
      * Sets the Voice Mailbox Brand Id to container.
      *
-     * @since S60 v5.2
      * @param in aBrandId New Brand Id.
      * @return One of the system wide error codes.
      */
@@ -145,7 +133,6 @@
     /**
      * Gets the VoIp name.
      *
-     * @since S60 v5.2
      * @param out aVmbxName If successful, contains the returned mailbox name.
      * @return One of the system wide error codes.
      */
@@ -154,7 +141,6 @@
     /**
      * Sets the VoIp name to container.
      *
-     * @since S60 v5.2
      * @param in aVmbxName New Voice Mailbox name.
      * @return One of the system wide error codes.
      */
@@ -163,7 +149,6 @@
     /**
      * Gets the type of memory location.
      *
-     * @since S60 v5.2
      * @return Memory location type.
      */
     IMPORT_C virtual TVmbxMemoryLocation UsingMemoryLocation( ) const;
@@ -171,14 +156,12 @@
     /**
      * Resets the container to initial state.
      *
-     * @since S60 v5.2
      */
     IMPORT_C virtual void Reset();
 
     /**
      * Sets the using memory location to entry.
      *
-     * @since S60 v5.2
      * @param in aType Memory location type.
      */
     virtual void SetUsingMemoryLocation( 
@@ -189,7 +172,6 @@
     /**
      * Second phase constructor.
      *
-     * @since S60 v5.2
      */
     void ConstructL();
 
@@ -198,7 +180,6 @@
      /**
      * Default constructor.
      *
-     * @since S60 v5.2
      */
 
     CVoiceMailboxEntry();
--- a/phonesrv_plat/voice_mailbox_number_api/inc/mvoicemailboxobserver.h	Mon May 03 13:01:45 2010 +0300
+++ b/phonesrv_plat/voice_mailbox_number_api/inc/mvoicemailboxobserver.h	Fri May 14 16:24:46 2010 +0300
@@ -25,7 +25,6 @@
 /**
  *  Notifier for vmbx number/address changes
  *
- *  @since S60 v5.2
  *  @lib vmbxengine.lib
  *
  */
@@ -37,7 +36,6 @@
     * Observer callback function which is called when
     * changes to voice mailbox entries occur.
     *
-    * @since S60 5.2
     * @param aVmbxEntry The new vmbx entry.
     */
     virtual void HandleNotifyL( const CVoiceMailboxEntry& aVmbxEntry ) = 0;
--- a/phonesrv_plat/voice_mailbox_number_api/inc/voicemailboxdefs.h	Mon May 03 13:01:45 2010 +0300
+++ b/phonesrv_plat/voice_mailbox_number_api/inc/voicemailboxdefs.h	Fri May 14 16:24:46 2010 +0300
@@ -76,7 +76,12 @@
      * When flag is enabled the user is not allowed to define or
      * modify the voice mailbox number.
      */
-    EVmbxChangeNbrNotAllowedOnUi = 0x01,
+    EVmbxChangeNbrAllowedOnUi = 0x01,
+
+    /**
+     * Used to check whether video mailbox is supported or not
+     */
+    EVmbxVideoMailboxSupported = 0x02
     };
 
 /** Vmbx Memory location which is currently used */
--- a/phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.cpp	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -111,92 +111,6 @@
 }
 
 // -----------------------------------------------------------------------------
-// Mt_vmbxEngine::testVmbxType
-// testVmbxType test case
-// Connects to test object signal and verifies received data.
-// -----------------------------------------------------------------------------
-void Mt_vmbxEngine::testVmbxType()
-{
-    qDebug("Mt_vmbxEngine::testVmbxType >");
-    QVERIFY(mVmbxEntry);
-    mVmbxEntry->SetVoiceMailboxType(EVmbxVoice);
-    QCOMPARE(mVmbxEntry->VoiceMailboxType(), EVmbxVoice);
-    qDebug("Mt_vmbxEngine::testVmbxType <");
-}
-
-// -----------------------------------------------------------------------------
-// Mt_vmbxEngine::testServiceId
-// testServiceId test case
-// Connects to test object signal and verifies received data.
-// -----------------------------------------------------------------------------
-void Mt_vmbxEngine::testServiceId()
-{
-    qDebug("Mt_vmbxEngine::testServiceId >");
-    QVERIFY(mVmbxEntry);
-    mVmbxEntry->SetServiceId(KVmbxServiceIdNone);
-    QCOMPARE(mVmbxEntry->ServiceId(), KVmbxServiceIdNone);
-    qDebug("Mt_vmbxEngine::testServiceId <");
-}
-
-// -----------------------------------------------------------------------------
-// Mt_vmbxEngine::testAlsLineType
-// testAlsLineType test case
-// Connects to test object signal and verifies received data.
-// -----------------------------------------------------------------------------
-void Mt_vmbxEngine::testAlsLineType()
-{
-    qDebug("Mt_vmbxEngine::testAlsLineType >");
-    QVERIFY(mVmbxEntry);
-    mVmbxEntry->SetVmbxAlsLineType(EVmbxAlsLine1);
-    QCOMPARE(mVmbxEntry->VmbxAlsLineType(), EVmbxAlsLine1);
-    qDebug("Mt_vmbxEngine::testAlsLineType <");
-}
-
-// -----------------------------------------------------------------------------
-// Mt_vmbxEngine::testVmbxNumber
-// testVmbxNumber test case
-// Connects to test object signal and verifies received data.
-// -----------------------------------------------------------------------------
-void Mt_vmbxEngine::testVmbxNumber()
-{
-    qDebug("Mt_vmbxEngine::testVmbxNumber >");
-    QVERIFY(mVmbxEntry);
-    TInt result= mVmbxEntry->SetVmbxNumber(KVmbxNumber);
-    QCOMPARE(result, KErrNone);
-    TPtrC vmbxNumber(KNullDesC);
-    result = mVmbxEntry->GetVmbxNumber(vmbxNumber);
-    QVERIFY2(KErrNone == result, "GetVmbxNumber failed");
-    QVERIFY2(vmbxNumber.Compare(KVmbxNumber) == 0, "Get wrong vmbxnumber");
-    qDebug("Mt_vmbxEngine::testVmbxNumber <");
-}
-
-// -----------------------------------------------------------------------------
-// Mt_vmbxEngine::testReset
-// testReset test case
-// Connects to test object signal and verifies received data.
-// -----------------------------------------------------------------------------
-void Mt_vmbxEngine::testReset()
-{
-    qDebug("Mt_vmbxEngine::testReset >");
-    QVERIFY(mVmbxEntry);
-    mVmbxEntry->Reset();
-    QCOMPARE(mVmbxEntry->VmbxAlsLineType(), EVmbxAlsLineDefault);
-    QCOMPARE(mVmbxEntry->ServiceId(), KVmbxServiceIdNone);
-    QCOMPARE(mVmbxEntry->VoiceMailboxType(), EVmbxNone);
-    QCOMPARE(mVmbxEntry->UsingMemoryLocation(),EVmbxSimMemory);
-    TPtrC vmbxNumber(KNullDesC);
-    TInt result = mVmbxEntry->GetVmbxNumber(vmbxNumber);
-    QCOMPARE(result, KErrNone);
-    QVERIFY(vmbxNumber.Compare(KNullDesC)==0);
-    // mVmbxEntry's vmbxname don't be set before
-    TPtrC vmbxName(KNullDesC);
-    result = mVmbxEntry->GetVmbxName(vmbxName);
-    QVERIFY2(KErrNotFound==result, "GetVmbxName failed");
-    QVERIFY2(vmbxName.Compare(KNullDesC) == 0, "Get wrong vmbxname");
-    qDebug("Mt_vmbxEngine::testReset <");
-}
-
-// -----------------------------------------------------------------------------
 // Mt_vmbxEngine::testCheckConfiguration
 // CreateVmbxMailbox test case
 // Connects to test object signal and verifies received data.
@@ -243,20 +157,6 @@
 }
 
 // -----------------------------------------------------------------------------
-// Mt_vmbxEngine::testNotifyVmbxNumberChange
-// testNotifyVmbxNumberChange test case
-// Connects to test object signal and verifies received data.
-// -----------------------------------------------------------------------------
-void Mt_vmbxEngine::testNotifyVmbxNumberChange()
-{
-    qDebug("Mt_vmbxEngine::testNotifyVmbxNumberChange >");
-    QVERIFY(mVmbxEngine);
-    //const bool test = true;
-    //mVmbxEngine->NotifyVmbxNumberChangeL(*this, true);
-    qDebug("Mt_vmbxEngine::testNotifyVmbxNumberChange <");
-}
-
-// -----------------------------------------------------------------------------
 // Mt_vmbxEngine::testSaveProvisionedEntry
 // testSaveProvisionedEntry test case
 // Connects to test object signal and verifies received data.
@@ -324,8 +224,9 @@
         qDebug("Mt_vmbxEngine::testQueryVmbxMailbox no number defined");
         // test QueryNewEntry
         result = mVmbxEngine->QueryNewEntry( params, vmbxEntry );
-        QVERIFY2(KErrNone == result, "QueryNewEntry Failed.");
-        if (mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrNotAllowedOnUi)) {
+        //QVERIFY2(KErrNone == result, "QueryNewEntry Failed.");
+        if (mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrNotAllowedOnUi)
+            && KErrNone == result) {
         // test SaveEntry
         result = mVmbxEngine->SaveEntry( *vmbxEntry );
         QVERIFY2(KErrNone == result, "SaveEntry Failed.");
@@ -334,8 +235,9 @@
         qDebug("Mt_vmbxEngine::testQueryVmbxMailbox change number");
         // test change entry
         result = mVmbxEngine->QueryChangeEntry( params, vmbxEntry );
-        QVERIFY2(KErrNone == result, "QueryChangeEntry Failed.");
-        if (mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrNotAllowedOnUi)) {
+        //QVERIFY2(KErrNone == result, "QueryChangeEntry Failed.");
+        if (mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrNotAllowedOnUi) 
+            && KErrNone == result ) {
             result = mVmbxEngine->SaveEntry( *vmbxEntry );
             QVERIFY2(KErrNone == result, "SaveEntry Failed.");
             // test GetStoredEntry
--- a/phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.h	Mon May 03 13:01:45 2010 +0300
+++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -40,7 +40,6 @@
  *  See cpp file for more information. 
  *
  *  @lib mt_vmbxngine.lib
- *  @since S60 <TB10.1>
  */
 class Mt_vmbxEngine : public QObject
 {
@@ -53,73 +52,29 @@
 
 private slots: 
 
-     /**
-     * Called before the first testfunction is executed.
-     * Handles the SetUpMenu command.
-     */
+    /*!
+        Called before the first testfunction is executed.
+    */
     void initTestCase();
 
-     /**
-     * Called after the last testfunction has been executed.
-     * 
-     */
+    /*!
+        Called after the last testfunction has been executed.
+    */
     void cleanupTestCase();
-    
-    // Called before each testfunction is executed. Currently not needed
-    //void init();
-
-     /**
-     * Called after every testfunction.   Currently not needed
-     * 
-     */
-    //void cleanup();
 
-	/**
-	* Test first case,Create testCreateVmbxEntry
-	* 
-	*/
-	void testCreateVmbxEntry();
-	
-	 /**
-	 * Test second case,Create CVoiceMailbox
-	 * 
-	 */
-	void testCreateVmbxMailbox();
-	
-	/**
-	* Test middle case,vmbx type
-	* 
-	*/
-	void testVmbxType();
-   
-	/**
-	* Test middle case,ServiceId
-	* 
-	*/
-	void testServiceId();
- 
-	/**
-	* Test middle case, AlsLine Type
-	* 
-	*/
-	void testAlsLineType();
-	
-	/**
-	* Test middle case, VmbxNumber
-	* 
-	*/
-	void testVmbxNumber();
-	
-	/**
-	* Test middle case, reset
-	* 
-	*/
-	void testReset();
+    /*!
+        Create an empty vmbx entry
+    */
+    void testCreateVmbxEntry();
+    
+    /*!
+        Create CVoiceMailbox Api
+    */
+    void testCreateVmbxMailbox();
 
-     /**
-     * Test middle case,CheckConfiguration
-     * 
-     */
+    /*!
+        Test middle case,CheckConfiguration
+    */
     void testCheckConfiguration();
 
     /**
@@ -129,11 +84,6 @@
     */
     void testCreateWindow();
  
-    /**
-    * Test middle case,regsit observer for vmbx number changed
-    * 
-    */
-   void testNotifyVmbxNumberChange();
 
    /**
    * Test middle case,SaveProvisionedEntry
@@ -161,13 +111,11 @@
 
      /**
      * Test middle case,delete CVoiceMailbox
-     * 
      */
     void testDeleteVmbxMailbox();
     
     /**
     * Test last case,delete CVoiceMailboxEntry
-    * 
     */
    void testDeleteVmbxEntry();
 
@@ -176,7 +124,7 @@
     /**
      * Own.
      */
-	CVoiceMailboxEntry* mVmbxEntry;
+    CVoiceMailboxEntry* mVmbxEntry;
 
     /**
      * Own.
--- a/phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.pro	Mon May 03 13:01:45 2010 +0300
+++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.pro	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 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"
@@ -15,7 +15,7 @@
 #
 
 TEMPLATE = app
-TARGET = 
+TARGET = mt_vmbxengine
 DEPENDPATH += .
 INCLUDEPATH += .
 CONFIG += hb
@@ -30,10 +30,7 @@
                    /epoc32/include/mw/QtTest \
                   ../../inc
 
-    LIBS += -lvmbxengine.dll\
-             -lflogger.dll
-
-
+    LIBS += -lvmbxengine.dll
 }
 
 # Input
--- a/satengine/SatServer/Commands/SetUpCallCmd/group/SetUpCallCmd.mmp	Mon May 03 13:01:45 2010 +0300
+++ b/satengine/SatServer/Commands/SetUpCallCmd/group/SetUpCallCmd.mmp	Fri May 14 16:24:46 2010 +0300
@@ -31,7 +31,6 @@
 SOURCE                  std.cpp
 SOURCE                  CSetUpCallHandler.cpp
 SOURCE                  csetupcallrequesthandler.cpp
-SOURCE                  csetupcallstatushandler.cpp
 
 START RESOURCE          1000f005.rss
 TARGET                  SetUpCallCmd.rsc
--- a/satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h	Mon May 03 13:01:45 2010 +0300
+++ b/satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h	Fri May 14 16:24:46 2010 +0300
@@ -189,6 +189,11 @@
      */
     void CreateEmergencyCall( CSetupCallRequestHandler& aHandler );
     
+    /**
+     * Check the Param of the setup call 
+     */
+    TBool CheckSetupCallParam();
+    
 private: // data
 
     /**
--- a/satengine/SatServer/Commands/SetUpCallCmd/inc/csetupcallrequesthandler.h	Mon May 03 13:01:45 2010 +0300
+++ b/satengine/SatServer/Commands/SetUpCallCmd/inc/csetupcallrequesthandler.h	Fri May 14 16:24:46 2010 +0300
@@ -22,8 +22,6 @@
 #include <e32base.h>
 #include "msatmultimodeapi.h"
 
-#include "csetupcallstatushandler.h"
-
 class CSetUpCallHandler;
 class MSatAsyncToSync;
 
@@ -32,14 +30,10 @@
 *  This active objects is registered with ETelMM Api to send request and 
 *  receive notifications about some Request Complete.
 *
-*  @lib CallControlCmd
-*  @since S60 v5.0.1
 */
 
-class CSetupCallRequestHandler : public CActive,
-                                 public MSetupCallStatusObserver
+class CSetupCallRequestHandler : public CActive
     {
-
 public:
 
     /**
@@ -74,11 +68,6 @@
      */
     void CancelOperation();
     
-    /**
-     *  From MSetupCallStatusObserver
-     *  The call status update notification from ETel MM
-     */
-    void CallSatatusChanged( const TInt status );
  
 protected:
 
@@ -103,15 +92,6 @@
     CSetupCallRequestHandler( MSatMultiModeApi& aPhone,
         CSetUpCallHandler* aDispatcher );
         
-    /**
-     * Two phase contruction.
-     */    
-    void ConstructL();
-
-private: //new method
-    
-    void HandleSetupCallStatusChange();
-        
 private: // Data
 
     /**
@@ -125,21 +105,10 @@
     CSetUpCallHandler* iDispatcher;
 
     /**
-     * Use to monite the status of call
-     * Own
-     */
-    CSetupCallStatusHandler *iStatusHandler;
-    
-    /**
      * Current call is an emergency call.
      */
     TBool iEmergencyCall;
-    
-    /**
-     * Terminal response to the SIM has been send
-     */
-    TBool iResponsed;
-    
+      
     };
 
 #endif      // CSETUPCALLREQUESTHANDLER_H
--- a/satengine/SatServer/Commands/SetUpCallCmd/inc/csetupcallstatushandler.h	Mon May 03 13:01:45 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Minite the call creating status by ETelMM
-*
-*/
-
-
-
-#ifndef CSETUPCALLSTATUSHANDLER_H
-#define CSETUPCALLSTATUSHANDLER_H
-
-#include <e32base.h>
-#include "msatmultimodeapi.h"
-
-
-class MSetupCallStatusObserver
-    {
-public:
-    /**
-     *  The call status update notification from ETel MM
-     */
-    virtual void CallSatatusChanged( const TInt status ) = 0;
-    };
-
-/**
-*  This is the handler for the ETel MM api Request.
-*  This active objects is registered with ETelMM Api to send request and 
-*  receive notifications about some Request Complete.
-*
-*  @lib SetupCallCmd
-*  @since S60 v5.0.1
-*/
-
-class CSetupCallStatusHandler : public CActive
-    {
-
-public:
-
-    /**
-     * Two-phased constructor.
-     * @param aPhone A reference to the MSatMultiModeApi.
-     * @param aDispatcher Pointer to Ss handler
-     * @return a pointer to the newly created object.
-     */
-    static CSetupCallStatusHandler* NewL( MSatMultiModeApi& aPhone,
-        MSetupCallStatusObserver* aDispatcher );
-
-    /**
-     * Destructor.
-     */
-    virtual ~CSetupCallStatusHandler();
-
-    /**
-     * Start to monite the call status by using ETel MM api
-     */    
-    void Start();
-    /**
-     * Cancel the asynchronous operations that required to the ETel MM api  
-     */
-    void CancelOperation();
- 
-protected:
-
-    /**
-     * From CActive, handles the request completion.
-     */
-    void RunL();
-    
-    
-    /**
-     * From CActive, handle the request cancel
-     */
-    void DoCancel();
-
-private:
-
-    /**
-     * C++ default constructor.
-     * @param aPriority An active object priority value.
-     * @param aPhone A reference to MSatMultiModeApi.
-     */
-    CSetupCallStatusHandler( MSatMultiModeApi& aPhone,
-        MSetupCallStatusObserver* aDispatcher );
-        
-private: //new method
-        
-    void HandleConnectingStatusChange();
-    
-private: // Data
-
-    /**
-     * Reference to the MSatMultiModeApi
-     */
-    MSatMultiModeApi& iPhone;
-        
-    /**
-     * Pointer to SendSs command handler
-     */
-    MSetupCallStatusObserver* iDispatcher;
-
-    /**
-     * Use this to get the RMobileCall status in 
-     * 
-     */    
-    RMobileCall::TMobileCallStatus iMobileCallStatus;
-
-    };
-
-#endif      // CSETUPCALLSTATUSHANDLER_H
--- a/satengine/SatServer/Commands/SetUpCallCmd/src/CSetUpCallHandler.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/satengine/SatServer/Commands/SetUpCallCmd/src/CSetUpCallHandler.cpp	Fri May 14 16:24:46 2010 +0300
@@ -41,6 +41,20 @@
 const TUint8 KWildChar( 0x77 );
 const TUint8 KExpansionChar( 0x2E );
 
+/** Maximum name length. */ 
+const TInt KSatMaximumNameLength = 50;
+
+/** Maximum phone number length same as  used by phone. */ 
+const TInt KSatMaximumPhoneNumberLength = 100;
+
+/** The subaddress length, see ITU-T I.330 and 3GPP TS 11.14. */ 
+const TInt KSatSubAddressLength = 21;
+
+/** The maximum bearer length. The bearer capabilities as 
+defined in GSM 04.08. */ 
+const TInt KSatBearerLength = 14;
+
+
 _LIT( KFixedSimEmergencyNumber, "112" );
 
 // ======== MEMBER FUNCTIONS ========
@@ -606,70 +620,60 @@
 // Performs the request to dial
 // -----------------------------------------------------------------------------
 //
-//ETel MM API Usage for SAT Todo
-//
-//2 RSAT::TSetUpCallV6 iCapabilityConfigParams we only have one TCcp and there
-//  are two in RMobilePhone::TMobileCallParamsV7 ( according the study of tommi
-//  the second TCcp in in TMobileCallParamsV7 will be ignored )
-//3 RMobilePhone::TMobileCallParamsV7 has TBCRepeatIndicator iBCRepeatIndicator
-//  RSat::TSetUpCallV6 don't have it. Does it needed from RSat
-//4 RMobilePhone::TMobileCallParamsV7 has TMobileCallMulticallBearerMode
-//  iBearerMode, RSat::TSetUpCallV6 does not have it. can we just use the
-//  default value?
-//5 SetShowNumber in AIW not provided by ETel MM, support needed?
-//6 SetAllowMach in AIW not provided by ETel MM, support needed?
-//8 Convert the return value from RMobilePhone::DialNoFdnCheck to the SAT error
-//  code, the return value is not enough, we need get more information from
-//  GetLineInfo.
-
-
 void CSetUpCallHandler::DoSetupCall( CSetupCallRequestHandler& aHandler )
     {
     LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoSetupCallL calling" )
-
-    RSat::TSetUpCallType callType( iSetUpCallData.iType );
-
-    TDes& telNumber( iSetUpCallData.iAddress.iTelNumber );
-    CheckNumber( telNumber );
-
-    RMobileCall::TMobileCallParamsV7 dialParams;
-    RMobileCall::TMobileCallParamsV7Pckg package( dialParams );
+    
+    if( CheckSetupCallParam () )
+        {
 
-    //Redail has been removed from MCL, no redail support.
-    dialParams.iAutoRedial = EFalse;
-    //TODO: check do we need to set bearer model
-    dialParams.iBearerMode = RMobileCall::EMulticallNewBearer;
-    dialParams.iCallParamOrigin = RMobileCall::EOriginatorSIM;
-    dialParams.iSubAddress = iSetUpCallData.iSubAddress;
-    dialParams.iBearerCap1 = iSetUpCallData.iCapabilityConfigParams;
+        RSat::TSetUpCallType callType( iSetUpCallData.iType );
     
-    dialParams.iBCRepeatIndicator = RMobileCall::EBCAlternateMode;
-    
-    dialParams.iIconId.iQualifier = RMobileCall::ENoIconId;
-    
+        TDes& telNumber( iSetUpCallData.iAddress.iTelNumber );
+        CheckNumber( telNumber );
+
+        RMobileCall::TMobileCallParamsV7 dialParams;
+        RMobileCall::TMobileCallParamsV7Pckg package( dialParams );
     
-    dialParams.iAlphaId = iSetUpCallData.iAlphaIdCallSetUpPhase.iAlphaId;
-    LOG2( NORMAL, 
-        "SETUPCALL: CSetUpCallHandler::DoSetupCallL id:%S",
-        &dialParams.iAlphaId )
-    
-    LOG2( NORMAL, 
-        "SETUPCALL: CSetUpCallHandler::DoSetupCallL number:%S",
-        &iSetUpCallData.iAddress.iTelNumber )
-    
-    TBool terminateOtherCall( EFalse );
-    // check if we need to disconnect other calls
-    if ( ( RSat::EDisconnectOtherCalls == callType ) ||
-         ( RSat::EDisconnectOtherCallsWithRedial == callType ) )
+        //Redail has been removed from MCL, no redail support.
+        dialParams.iAutoRedial = EFalse;
+        dialParams.iBearerMode = RMobileCall::EMulticallNewBearer;
+        dialParams.iCallParamOrigin = RMobileCall::EOriginatorSIM;
+        dialParams.iSubAddress = iSetUpCallData.iSubAddress;
+        dialParams.iBearerCap1 = iSetUpCallData.iCapabilityConfigParams;
+        
+        dialParams.iBCRepeatIndicator = RMobileCall::EBCAlternateMode;
+        
+        dialParams.iIconId.iQualifier = RMobileCall::ENoIconId;
+        
+        
+        dialParams.iAlphaId = iSetUpCallData.iAlphaIdCallSetUpPhase.iAlphaId;
+        LOG2( NORMAL, 
+            "SETUPCALL: CSetUpCallHandler::DoSetupCallL id:%S",
+            &dialParams.iAlphaId )
+        
+        LOG2( NORMAL, 
+            "SETUPCALL: CSetUpCallHandler::DoSetupCallL number:%S",
+            &iSetUpCallData.iAddress.iTelNumber )
+        
+        TBool terminateOtherCall( EFalse );
+        // check if we need to disconnect other calls
+        if ( ( RSat::EDisconnectOtherCalls == callType ) ||
+             ( RSat::EDisconnectOtherCallsWithRedial == callType ) )
+            {
+            LOG( SIMPLE, 
+            "SETUPCALL: CSetUpCallHandler::DoSetupCallL end other call" )
+            terminateOtherCall = ETrue ;
+            }
+        
+        aHandler.DialNumber( package, iSetUpCallData.iAddress.iTelNumber,
+                terminateOtherCall, iUtils->CreateAsyncToSyncHelper() );
+        }
+    else
         {
-        LOG( SIMPLE, 
-        "SETUPCALL: CSetUpCallHandler::DoSetupCallL end other call" )
-        terminateOtherCall = ETrue ;
+        CompleteSetupCallWithStatus( KErrArgument );
         }
     
-    aHandler.DialNumber( package, iSetUpCallData.iAddress.iTelNumber,
-            terminateOtherCall, iUtils->CreateAsyncToSyncHelper() );
-    
     LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoSetupCallL exiting" )
     }
 
@@ -733,6 +737,7 @@
                 }
 
             case KErrGeneral:
+            case KErrArgument:
                 {
                 LOG( SIMPLE, 
                 "SETUPCALL: CSetUpCallHandler::CompleteSetupCallWithStatus Data \
@@ -895,7 +900,7 @@
 void CSetUpCallHandler::CheckNumber( TDes& aNumber ) const
     {
     LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckNumber calling" )
-
+    
     for ( TInt i = 0; i < aNumber.Length(); i++ )
         {
         // check values
@@ -954,4 +959,42 @@
     LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCall exiting" )    
     }
 
+// -----------------------------------------------------------------------------
+// check setup call param.
+// -----------------------------------------------------------------------------
+//
+TBool CSetUpCallHandler::CheckSetupCallParam()
+    {
+    LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam calling" )
+
+    TBool valid( ETrue );
+    if ( iSetUpCallData.iAddress.iTelNumber.Length()
+          > KSatMaximumPhoneNumberLength )
+        {
+        LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam num" )
+        valid = EFalse;
+        }    
+    else if ( iSetUpCallData.iAlphaIdCallSetUpPhase.iAlphaId.Length()
+               > KSatMaximumNameLength )
+        {
+        LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam name" )
+        valid = EFalse;
+        }    
+    else if ( iSetUpCallData.iSubAddress.Length() > KSatSubAddressLength )
+        {
+        LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam sub" )
+        valid = EFalse;
+        }    
+    else if ( iSetUpCallData.iCapabilityConfigParams.Length()
+               > KSatBearerLength )
+        {
+        LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam bear" )
+        valid = EFalse;
+        }    
+    LOG2( SIMPLE, 
+    "SETUPCALL: CSetUpCallHandler::CheckSetupCallParam exiting %d", valid )
+    return valid;        
+    }
+
+
 // End Of File
--- a/satengine/SatServer/Commands/SetUpCallCmd/src/csetupcallrequesthandler.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/satengine/SatServer/Commands/SetUpCallCmd/src/csetupcallrequesthandler.cpp	Fri May 14 16:24:46 2010 +0300
@@ -61,27 +61,11 @@
     CSetupCallRequestHandler* self =
         new ( ELeave ) CSetupCallRequestHandler( aPhone, aDispatcher );
  
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
     LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::NewL exiting" )
     return self;
     }
 
 // -----------------------------------------------------------------------------
-// CSetupCallRequestHandler::ConstructL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-void CSetupCallRequestHandler::ConstructL()
-    {
-    LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::ConstructL calling" )
-    iStatusHandler = CSetupCallStatusHandler::NewL( iPhone, this );
-    LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::ConstructL exiting" )    
-    }
-
-// -----------------------------------------------------------------------------
 // CSetupCallRequestHandler::~CSetupCallRequestHandler
 // Destructor
 // -----------------------------------------------------------------------------
@@ -92,8 +76,7 @@
             CSetupCallRequestHandler::~CSetupCallRequestHandler calling" )
     Cancel();
     iDispatcher = NULL;
-    delete iStatusHandler;
-    
+
     LOG( SIMPLE, "SETUPCALL: \
             CSetupCallRequestHandler::~CSetupCallRequestHandler exiting" )
     }
@@ -130,10 +113,6 @@
         if( KErrNone == terminateRes )
             {
             iPhone.DialNoFdnCheck( iStatus, aCallParams, aTelNumber );
-            if ( iStatusHandler )
-                {
-                iStatusHandler->Start();
-                }
             SetActive();
             }
         else
@@ -183,41 +162,13 @@
     LOG2( NORMAL, "SETUPCALL: CSetupCallRequestHandler::RunL\
           iStatus == %i", iStatus.Int() )
 
-    if( !iResponsed )
+    if ( iEmergencyCall )
         {
-        if ( iEmergencyCall || KErrNone == iStatus.Int() )
-            {
-            iEmergencyCall = EFalse;
-            iDispatcher->SetupCallRequestComplete( iStatus.Int() );
-            }
-        else
-            {
-            RMobileCall::TMobileCallInfoV8 info;
-            RMobileCall::TMobileCallInfoV8Pckg infoPkg( info );
-            TInt res = iPhone.GetMobileCallInfo( infoPkg );
-        
-            LOG2( NORMAL, "SETUPCALL: CSetupCallRequestHandler::\
-                  HandleSetupCallStatusChange exit code == %i",
-                  info.iExitCode )
-        
-            if( ( KErrNone == res ) && 
-                    (KErrNone != info.iExitCode) &&
-                    (KErrNotFound != info.iExitCode) )
-                {
-                iDispatcher->SetupCallRequestComplete( info.iExitCode );
-                }
-            else
-                {
-                iDispatcher->SetupCallRequestComplete( iStatus.Int() );
-                }
-            }
+        iEmergencyCall = EFalse;
         }
-   
-    if( iStatusHandler )
-        {
-        iStatusHandler->Cancel();
-        }
-    iResponsed = EFalse;
+    
+    iDispatcher->SetupCallRequestComplete( iStatus.Int() );                
+    
     LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::RunL exiting" )
     }
 
@@ -230,10 +181,6 @@
     LOG( SIMPLE, "SETUPCALL: \
                   CSetupCallRequestHandler::CancelOperation calling" )
     iPhone.DialCancel();
-    if( iStatusHandler )
-        {
-        iStatusHandler->Cancel();
-        }
     LOG( SIMPLE, 
         "SETUPCALL: CSetupCallRequestHandler::CancelOperation exiting" )
     }
@@ -250,37 +197,4 @@
     LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DoCancel exiting" )
     }
 
-// -----------------------------------------------------------------------------
-// CSetupCallRequestHandler::HandleConnectingStatusChange
-// -----------------------------------------------------------------------------
-//
-void CSetupCallRequestHandler::CallSatatusChanged( const TInt aStatus )
-    {
-    LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::\
-            CallSatatusChanged  calling" )
-    
-    LOG2( NORMAL, "SETUPCALL: CSetupCallRequestHandler::\
-        CallSatatusChanged status == %i", aStatus )
-    // We only care about the connecting status, after call is
-    // connecting, we can send the respones to the SIM. For other status we will
-    // waiting for the status of DialNumber.    
-    if( ( aStatus == RMobileCall::EStatusConnected )
-        || ( aStatus == RMobileCall::EStatusConnecting ))
-        {
-        iResponsed = ETrue;
-        iDispatcher->SetupCallRequestComplete( KErrNone );
-        }
-    else
-        {
-        if ( iStatusHandler )
-            {
-            iStatusHandler->Start();
-            }
-        }
-
-    LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::\
-            CallSatatusChanged  exiting" )
-    }
-
-
 //  End of File
--- a/satengine/SatServer/Commands/SetUpCallCmd/src/csetupcallstatushandler.cpp	Mon May 03 13:01:45 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
-* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Minite the call creating status by ETelMM
-*
-*/
-
-
-#include <etelmm.h>
-#include <mmtsy_names.h>
-
-#include "csetupcallstatushandler.h"
-#include "CSetUpCallHandler.h"
-#include "msatasynctosync.h"
-#include "SatLog.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// -----------------------------------------------------------------------------
-// CSetupCallStatusHandler::CSetupCallStatusHandler
-// The class constructor.
-// -----------------------------------------------------------------------------
-//
-CSetupCallStatusHandler::CSetupCallStatusHandler(
-                MSatMultiModeApi& aPhone, MSetupCallStatusObserver* aDispatcher )
-    : CActive( EPriorityStandard ), iPhone( aPhone ), 
-      iDispatcher( aDispatcher )
-    {
-    LOG( SIMPLE,
-        "SETUPCALL: CSetupCallStatusHandler::CSetupCallStatusHandler \
-        calling" )
-
-    CActiveScheduler::Add( this );
-
-    LOG( SIMPLE,
-        "SETUPCALL: CSetupCallStatusHandler::CSetupCallStatusHandler \
-        exiting" )
-    }
-
-// -----------------------------------------------------------------------------
-// CSetupCallStatusHandler::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CSetupCallStatusHandler* CSetupCallStatusHandler::NewL(
-    MSatMultiModeApi& aPhone, MSetupCallStatusObserver* aDispatcher )
-    {
-    LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::NewL calling" )
-
-    CSetupCallStatusHandler* self =
-        new ( ELeave ) CSetupCallStatusHandler( aPhone, aDispatcher );
-            
-    LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::NewL exiting" )
-    return self;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CSetupCallStatusHandler::~CSetupCallStatusHandler
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CSetupCallStatusHandler::~CSetupCallStatusHandler()
-    {
-    LOG( SIMPLE, "SETUPCALL: \
-            CSetupCallStatusHandler::~CSetupCallStatusHandler calling" )
-    Cancel();
-
-    LOG( SIMPLE, "SETUPCALL: \
-            CSetupCallStatusHandler::~CSetupCallStatusHandler exiting" )
-    }
-
-// -----------------------------------------------------------------------------
-// CSetupCallStatusHandler::DialNumber
-// -----------------------------------------------------------------------------
-//
-void CSetupCallStatusHandler::Start()
-    {
-    LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::Start calling" )
-    if( !IsActive() )
-        {
-        iPhone.NotifyMobileCallStatusChange( iStatus,
-            iMobileCallStatus );
-        SetActive();
-        }
-    LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::Start exiting" )
- 
-    }
-
-// -----------------------------------------------------------------------------
-// CSetupCallStatusHandler::RunL
-// Handles the command.
-// -----------------------------------------------------------------------------
-//
-void CSetupCallStatusHandler::RunL()
-    {
-    LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::RunL calling" )
-    
-    LOG2( NORMAL, "SETUPCALL: CSetupCallStatusHandler::RunL\
-          iStatus == %i", iStatus.Int() )
-
-    LOG2( NORMAL, "SETUPCALL: CSetupCallStatusHandler::RunL\
-        iMobileCallStatus == %i", iMobileCallStatus )
-
-    if( ( KErrNone == iStatus.Int() ) && iDispatcher )
-        {
-        iDispatcher->CallSatatusChanged ( iMobileCallStatus );
-        }
-    
-    LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::RunL exiting" )
-    }
-
-// -----------------------------------------------------------------------------
-// CSetupCallStatusHandler::CancelOperation
-// -----------------------------------------------------------------------------
-//
-void CSetupCallStatusHandler::CancelOperation()
-    {
-    LOG( SIMPLE, "SETUPCALL: \
-                  CSetupCallStatusHandler::CancelOperation calling" )
-    iPhone.NotifyCallStatusChangeCancel();
-    LOG( SIMPLE, 
-        "SETUPCALL: CSetupCallStatusHandler::CancelOperation exiting" )
-    }
-
-// -----------------------------------------------------------------------------
-// From class CActive.
-// Cancels the sat request.
-// -----------------------------------------------------------------------------
-//
-void CSetupCallStatusHandler::DoCancel()
-    {
-    LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::DoCancel calling" )
-    CancelOperation();
-    LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::DoCancel exiting" )
-    }
-
-//  End of File
--- a/satengine/SatServer/Commands/SetUpIdleModeTextCmd/inc/CSetUpIdleModeTextHandler.h	Mon May 03 13:01:45 2010 +0300
+++ b/satengine/SatServer/Commands/SetUpIdleModeTextCmd/inc/CSetUpIdleModeTextHandler.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -119,9 +119,6 @@
         // Response package.
         RSat::TSetUpIdleModeTextRspV1Pckg iSetUpIdleModeTextRspPckg;
 
-        // Indicates are we waiting for response
-        TBool iWaitingForResponse;
-
         // Store for restoring last valid idle mode text.
         TBool iSimResetExecuting;
         RSat::TIdleModeText iLastValidText;
--- a/satengine/SatServer/Commands/SetUpIdleModeTextCmd/src/CSetUpIdleModeTextHandler.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/satengine/SatServer/Commands/SetUpIdleModeTextCmd/src/CSetUpIdleModeTextHandler.cpp	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -66,14 +66,6 @@
     LOG( SIMPLE, "SETUPIDLEMODETEXT: \
         CSetUpIdleModeTextHandler::ConstructL calling" )
 
-    iWaitingForResponse = EFalse;
-
-    // Register to listen Idle mode responses.
-    iUtils->RegisterL( this, MSatUtils::EIdleModeResponseSuccess );
-    iUtils->RegisterL( this, MSatUtils::EIdleModeResponseSuccessNoIcon );
-    iUtils->RegisterL( this, MSatUtils::EIdleModeResponseUnableToProcess );
-    iUtils->RegisterL( this, MSatUtils::EIdleModeResponseBeyondCapabilities );
-
     // Register to listen ESimReset execution.
     iUtils->RegisterL( this, MSatUtils::ESimResetCalled );
     iUtils->RegisterL( this, MSatUtils::ESimResetCancelled );
@@ -135,50 +127,9 @@
     {
     LOG( SIMPLE,
         "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler::Event calling" )
-    TBool responseOk( EFalse );
-
     // Check the response
     switch ( aEvent )
         {
-        case MSatUtils::EIdleModeResponseSuccess:
-            {
-            LOG( NORMAL, "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler \
-                KSuccess")
-            iSetUpIdleModeTextRsp.iGeneralResult = RSat::KSuccess;
-            responseOk = ETrue;
-            break;
-            }
-
-        case MSatUtils::EIdleModeResponseSuccessNoIcon:
-            {
-            LOG( NORMAL, "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler \
-                KSuccessReqIconNotDisplayed")
-            iSetUpIdleModeTextRsp.iGeneralResult =
-                RSat::KSuccessRequestedIconNotDisplayed;
-            responseOk = ETrue;
-            break;
-            }
-
-        case MSatUtils::EIdleModeResponseUnableToProcess:
-            {
-            LOG( NORMAL, "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler \
-                KMeUnableToProcessCmd")
-            iSetUpIdleModeTextRsp.iGeneralResult =
-                RSat::KMeUnableToProcessCmd;
-            responseOk = ETrue;
-            break;
-            }
-
-        case MSatUtils::EIdleModeResponseBeyondCapabilities:
-            {
-            LOG( NORMAL, "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler \
-                KBeyondMeCapabilities")
-            iSetUpIdleModeTextRsp.iGeneralResult =
-                RSat::KCmdBeyondMeCapabilities;
-            responseOk = ETrue;
-            break;
-            }
-
         case MSatUtils::ESimResetCalled:
             {
             LOG( NORMAL, "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler \
@@ -244,17 +195,6 @@
             break;
             }
         }
-
-    if ( responseOk && iWaitingForResponse )
-        {
-        LOG( NORMAL, "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler \
-        send response")
-        iWaitingForResponse = EFalse;
-
-        // Send terminal response, if the event was solved
-        TerminalRsp( RSat::ESetUpIdleModeText, iSetUpIdleModeTextRspPckg );
-        }
-
     LOG( SIMPLE,
         "SETUPIDLEMODETEXT: CSetUpIdleModeTextHandler::Event exiting" )
     }
@@ -402,8 +342,6 @@
         }
     else
         {
-        iWaitingForResponse = ETrue;
-
         // Save data for restore.
         iSimResetExecuting = EFalse;
         iLastValidText = idleModeText;
@@ -431,6 +369,9 @@
                     remove the homezone indicator and return %d", errorCode )
                 }
             }
+        
+        iSetUpIdleModeTextRsp.iGeneralResult = RSat::KSuccess;
+        TerminalRsp( RSat::ESetUpIdleModeText, iSetUpIdleModeTextRspPckg );
         }
 
     LOG( SIMPLE,
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/inc/dialogwaiter.h	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* 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: dialog waiter
+*
+*
+*/
+
+#ifndef DIALOGWAITER_H
+#define DIALOGWAITER_H
+
+// INCLUDES
+#include <QObject>
+#include <QEventLoop>
+
+// FORWARD DECLARATION
+class HbAction;
+
+/**
+ * This utility synchronises access to dialogs, popups, menus and
+ * other ORBIT resources. How to use:
+ * <code>
+ * HbDialog* dialog = new HbDialog();
+ * DialogWaiter waiter();
+ * dialog->open(&waiter, SLOT(done(HbAction*)));
+ * HbAction* result = waiter.wait();
+ * delete dialog;
+ * if (result==...) ...
+ * </code>
+ */
+class DialogWaiter : public QObject
+{
+    Q_OBJECT
+
+    public:
+    
+        /**
+         * waits until dialog exits
+         * returns dialog exit action
+         */
+        HbAction* wait();
+
+    private slots:
+        void done(HbAction* result);
+
+    private:
+        QEventLoop mLoop;
+        HbAction* mResult;
+
+};
+
+#endif  // DIALOGWAITER_H
--- a/satui/satapp/resource/qgn_menu_sat.svg	Mon May 03 13:01:45 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-<?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 width="100%" height="100%" viewBox="0 0 88 88">
-<linearGradient id="_10" gradientUnits="userSpaceOnUse" x1="40.24" y1="46.68" x2="57.84" y2="81.34">
-<stop stop-color="#A2C2DD" offset="0.1"/>
-<stop stop-color="#6C83BB" offset="0.71"/>
-<stop stop-color="#003D6D" offset="0.99"/>
-</linearGradient>
-<path fill="url(#_10)" d="M26.734,9.7v41.113l-5.93-1.235L9.83,55.709l1.757,17.196l14.224,4.875l10.219-7.06l0.172-2.886 l33.144,7.405l3.086-3.029l0.747-43.317L58.593,14.075L30.578,8.457L26.734,9.7z"/>
-<linearGradient id="_11" gradientUnits="userSpaceOnUse" x1="60.52" y1="8.31" x2="41.86" y2="60.31">
-<stop stop-color="#FFFFFF" offset="0.05"/>
-<stop stop-color="#A2C2DD" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_11)" points="69.207,31.139 69.207,74.493 27.435,65.159 27.435,10.123 54.951,16.272 "/>
-<linearGradient id="_12" gradientUnits="userSpaceOnUse" x1="35.08" y1="29.48" x2="48.42" y2="62.81">
-<stop stop-color="#E6EEF4" offset="0"/>
-<stop stop-color="#9646AC" offset="0.44"/>
-<stop stop-color="#3D013F" offset="0.94"/>
-</linearGradient>
-<path fill="url(#_12)" d="M54.835,57.479c0,9.869-10.149,8.211-12.022,7.35 c-2.881-0.682-11.616-5.004-11.616-13.557V41.204c0-10.296,11.059-7.697,11.285-7.728c0,0,11.985,2.593,12.354,13.935 V57.479z"/>
-<path fill="url(#_11)" d="M50.967,46.274l3.818,1.004l0.333-1.48l-4.151-1.092v-8.988l-1.53-0.061v11.992 c-0.937-0.701-2.028-1.332-3.222-1.857V33.926l-1.529-0.06v11.332c-0.48-0.166-3.066-0.803-3.815-0.891V33.065 l-1.53-0.061v11.214c-1.056-0.01-2.012,0.115-2.824,0.373v-12.67l-1.53-0.061v8.647l-3.821-1.002l-0.333,1.482 l4.154,1.086v21.064l1.53,0.061V52.026c0.814,0.654,1.771,1.254,2.824,1.775v10.482l1.53,0.061v-9.869 c0.68,0.264,3.253,0.949,3.815,1.039V65.69l1.529,0.059V55.692c1.197,0.072,2.289-0.016,3.222-0.256v11.5l1.53,0.061 v-8.152l3.818,1.004l0.333-1.48l-4.151-1.092V46.274z M36.516,50.256v-3.754c2.981-1.502,9.644-0.107,12.921,2.846 v4.227C45.988,54.948,39.223,53.006,36.516,50.256z"/>
-<linearGradient id="_14" gradientUnits="userSpaceOnUse" x1="70.44" y1="22.07" x2="71.08" y2="85.59">
-<stop stop-color="#FFFFFF" offset="0"/>
-<stop stop-color="#A2C2DD" offset="0.35"/>
-<stop stop-color="#6C83BB" offset="0.7"/>
-<stop stop-color="#003D6D" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_14)" points="69.014,74.584 71.735,71.913 72.473,29.176 69.149,31.196 "/>
-<linearGradient id="_15" gradientUnits="userSpaceOnUse" x1="41.8" y1="15.16" x2="44.04" y2="9.08">
-<stop stop-color="#FFFFFF" offset="0.05"/>
-<stop stop-color="#A2C2DD" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_15)" points="58.244,14.719 30.62,9.179 27.352,10.19 55.208,16.54 "/>
-<linearGradient id="_16" gradientUnits="userSpaceOnUse" x1="57.6" y1="-2.83" x2="65.7" y2="30.53">
-<stop stop-color="#FFFFFF" offset="0.15"/>
-<stop stop-color="#A2C2DD" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_16)" points="55.208,16.54 69.149,31.196 72.473,29.176 58.244,14.719 "/>
-<polygon fill="#58A015" points="25.703,77.004 12.237,72.389 10.667,56.096 26.188,60.045 "/>
-<polygon fill="#17594C" points="25.703,77.004 35.351,70.338 36.358,53.522 25.703,60.045 "/>
-<linearGradient id="_17" gradientUnits="userSpaceOnUse" x1="10.57" y1="55.18" x2="36.31" y2="55.18">
-<stop stop-color="#DCE8E4" offset="0"/>
-<stop stop-color="#43910A" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_17)" points="10.573,56.096 25.703,60.045 36.31,53.522 20.918,50.317 "/>
-<linearGradient id="_18" gradientUnits="userSpaceOnUse" x1="9.06" y1="79.5" x2="25.64" y2="70.32">
-<stop stop-color="#DCE8E4" offset="0"/>
-<stop stop-color="#43910A" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_18)" points="25.669,68.159 25.703,77.004 12.237,72.389 23.495,64.79 "/>
-<rect fill="none" height="88" width="88"/>
-</svg>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/resource/qtg_large_sat.svg	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,74 @@
+<?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" height="60" viewBox="0 0 60 60" width="60" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<rect fill="none" height="60" width="60"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_1" x1="30" x2="30" y1="8.53" y2="50.71">
+<stop offset="0" stop-color="#A0A3A6"/>
+<stop offset="0.82" stop-color="#474B4D"/>
+<stop offset="1" stop-color="#7B7E80"/>
+</linearGradient>
+<path d="M14.126,50.774c-1.029,0-1.865-0.835-1.865-1.865V10.397c0-1.028,0.836-1.864,1.865-1.864 h23.233c0.842,0,1.967,0.467,2.563,1.061l6.752,6.751c0.595,0.596,1.061,1.721,1.061,2.563v30.001c0,1.03-0.836,1.865-1.865,1.865 L14.126,50.774L14.126,50.774z" fill="url(#SVGID_1)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_2" x1="30" x2="30" y1="9.15" y2="50.09">
+<stop offset="0" stop-color="#E6E9E8"/>
+<stop offset="1" stop-color="#ADB2B5"/>
+</linearGradient>
+<path d="M39.482,10.035c-0.483-0.483-1.439-0.88-2.123-0.88H14.126c-0.684,0-1.244,0.561-1.244,1.243 v38.511c0,0.684,0.56,1.244,1.244,1.244h31.743c0.685,0,1.244-0.561,1.244-1.244v-30c0-0.684-0.396-1.639-0.879-2.123L39.482,10.035 z" fill="url(#SVGID_2)"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_3" x1="30" x2="30" y1="9.26" y2="50.26">
+<stop offset="0" stop-color="#F5F5F5"/>
+<stop offset="0.78" stop-color="#CCCCCC"/>
+<stop offset="1" stop-color="#D1D1D1"/>
+</linearGradient>
+<path d="M37.359,9.776c0.516,0,1.317,0.332,1.684,0.697l6.751,6.75 c0.365,0.366,0.697,1.167,0.697,1.684v30.001c0,0.344-0.278,0.622-0.622,0.622H14.126c-0.344,0-0.622-0.278-0.622-0.622V10.397 c0-0.342,0.278-0.622,0.622-0.622L37.359,9.776 M37.359,9.154H14.126c-0.684,0-1.244,0.561-1.244,1.243v38.511 c0,0.684,0.56,1.244,1.244,1.244h31.743c0.685,0,1.244-0.561,1.244-1.244v-30c0-0.684-0.396-1.639-0.879-2.123l-6.752-6.75 C38.999,9.552,38.043,9.154,37.359,9.154L37.359,9.154z" fill="url(#SVGID_3)"/>
+<rect fill="#E6E7E8" height="0.612" width="22.941" x="16.24" y="45.59"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_4" x1="28.02" x2="28.02" y1="45.58" y2="25.53">
+<stop offset="0" stop-color="#666666"/>
+<stop offset="1" stop-color="#282828"/>
+</linearGradient>
+<rect fill="url(#SVGID_4)" height="20.202" width="23.553" x="16.24" y="25.45"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_5" x1="19.61" x2="19.61" y1="26.43" y2="44.18">
+<stop offset="0" stop-color="#FFF173"/>
+<stop offset="0.33" stop-color="#F1BC35"/>
+<stop offset="0.66" stop-color="#E5B029"/>
+<stop offset="1" stop-color="#FFA102"/>
+</linearGradient>
+<rect fill="url(#SVGID_5)" height="5.51" width="4.285" x="17.464" y="38.855"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_6" x1="30.14" x2="30.14" y1="26.62" y2="43.94">
+<stop offset="0" stop-color="#FFF173"/>
+<stop offset="0.33" stop-color="#F1BC35"/>
+<stop offset="0.66" stop-color="#E5B029"/>
+<stop offset="1" stop-color="#FFA102"/>
+</linearGradient>
+<rect fill="url(#SVGID_6)" height="5.509" width="3.963" x="28.161" y="26.612"/>
+<rect fill="url(#SVGID_6)" height="5.509" width="3.963" x="22.974" y="26.612"/>
+<rect fill="url(#SVGID_6)" height="5.509" width="5.188" x="33.348" y="26.612"/>
+<rect fill="url(#SVGID_5)" height="5.51" width="3.963" x="28.161" y="38.855"/>
+<rect fill="url(#SVGID_5)" height="5.51" width="3.963" x="22.974" y="38.855"/>
+<polygon fill="url(#SVGID_6)" points="21.683,33.346 21.683,26.612 17.464,26.612 17.464,37.631 38.535,37.631 38.535,33.346 "/>
+<rect fill="url(#SVGID_5)" height="5.51" width="5.188" x="33.348" y="38.855"/>
+<g transform="matrix(0.5 0 0 0.5 30 30)">
+<rect fill="none" height="59.996" width="59.996"/>
+<path d="M30.295,21.957c0.98,0,1.767-0.243,2.359-0.727 c0.592-0.485,0.888-1.15,0.888-2c0-0.825-0.306-1.487-0.915-1.982c-0.609-0.495-1.387-0.744-2.332-0.744 c-0.993,0-1.778,0.245-2.358,0.735c-0.581,0.491-0.87,1.154-0.87,1.991c0,0.849,0.296,1.515,0.888,2 C28.547,21.714,29.327,21.957,30.295,21.957z" fill-opacity="0.1" stroke-opacity="0.1"/>
+<path d="M30.295,21.344c0.98,0,1.767-0.242,2.359-0.727s0.888-1.15,0.888-2 c0-0.825-0.306-1.486-0.915-1.982c-0.609-0.495-1.387-0.744-2.332-0.744c-0.993,0-1.778,0.245-2.358,0.735 c-0.581,0.49-0.87,1.154-0.87,1.991c0,0.849,0.296,1.515,0.888,2C28.547,21.102,29.327,21.344,30.295,21.344z" fill-opacity="0.2" stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="30" x2="30" y1="8.77" y2="51.63">
+<stop offset="0" stop-color="#E5FFB2"/>
+<stop offset="0.39" stop-color="#6AAB18"/>
+<stop offset="0.68" stop-color="#247307"/>
+<stop offset="1" stop-color="#C2FF4A"/>
+</linearGradient>
+<circle cx="29.998" cy="29.998" fill="url(#SVGID_1_)" r="21.427"/>
+<radialGradient cx="30.2" cy="11.02" gradientUnits="userSpaceOnUse" id="SVGID_2_" r="39.38">
+<stop offset="0" stop-color="#AFED23"/>
+<stop offset="0.81" stop-color="#358C0C"/>
+<stop offset="1" stop-color="#67AD1A"/>
+</radialGradient>
+<path d="M29.998,50.813c-11.478,0-20.815-9.337-20.815-20.814S18.521,9.183,29.998,9.183 c11.479,0,20.814,9.337,20.814,20.815S41.475,50.813,29.998,50.813L29.998,50.813z" fill="url(#SVGID_2_)"/>
+<polygon fill-opacity="0.1" points="25.252,27.84 27.297,27.84 27.297,45.543 33.251,45.543 33.251,24.451 25.252,24.451 " stroke-opacity="0.1"/>
+<polygon fill-opacity="0.2" points="25.252,27.228 27.297,27.228 27.297,44.932 33.251,44.932 33.251,23.838 25.252,23.838 " stroke-opacity="0.2"/>
+<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="29.25" x2="29.25" y1="15.88" y2="44.66">
+<stop offset="0" stop-color="#F6FDFF"/>
+<stop offset="1" stop-color="#ADB3B5"/>
+</linearGradient>
+<polygon fill="url(#SVGID_3_)" points="25.252,26.616 27.297,26.616 27.297,44.318 33.251,44.318 33.251,23.226 25.252,23.226 "/>
+<path d="M30.274,21.038c0.981,0,1.767-0.242,2.359-0.727s0.888-1.15,0.888-2 c0-0.825-0.306-1.486-0.915-1.982c-0.609-0.495-1.387-0.744-2.332-0.744c-0.992,0-1.778,0.245-2.357,0.735 c-0.581,0.49-0.871,1.154-0.871,1.991c0,0.849,0.296,1.515,0.888,2C28.525,20.796,29.305,21.038,30.274,21.038z" fill="url(#SVGID_3_)"/>
+</g>
+</svg>
Binary file satui/satapp/resource/sat_text_map.xls has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/resource/satapp.docml	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument context="satapp" version="0.7">
+    <widget name="setupmenu_view" type="SatAppView">
+        <widget name="content" role="HbView:widget" type="HbWidget">
+            <widget name="s:ListWidget" type="HbListWidget">
+                <real name="z" value="1"/>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="s:ListWidget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="s:ListWidget" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+                <anchoritem dst="s:ListWidget" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="s:ListWidget" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+            </layout>
+        </widget>
+        <widget name="s:MenuAction" role="HbView:menu" type="HbMenu">
+            <!--ref object="t:exit" role="HbMenu:addAction"/-->
+        </widget>
+        <string name="title" value="SIM Services"/>
+    </widget>
+    <widget name="selectitem_view" type="SatAppView">
+        <widget name="content_2" role="HbView:widget" type="HbWidget">
+            <widget name="t:ListWidget" type="HbListWidget">
+                <real name="z" value="2"/>
+            </widget>
+            <widget name="t:label" type="HbLabel">
+                <real name="z" value="3"/>
+                <sizehint height="6un" type="PREFERRED"/>
+            </widget>
+            <layout type="anchor">
+                <anchoritem dst="t:ListWidget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="t:ListWidget" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="t:ListWidget" dstEdge="TOP" spacing="6un" src="" srcEdge="TOP"/>
+                <anchoritem dst="t:ListWidget" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
+                <anchoritem dst="t:label" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
+                <anchoritem dst="t:label" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
+                <anchoritem dst="t:label" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
+            </layout>
+        </widget>
+        <widget name="t:MenuAction" role="HbView:menu" type="HbMenu">
+            <!--ref object="t:back" role="HbMenu:addAction"/-->
+            <!--ref object="t:exit" role="HbMenu:addAction"/-->
+        </widget>
+        <string name="title" value="SIM Services"/>
+    </widget>
+    <!--connect receiver="selectitem_view" sender="t:back" signal="triggered()" slot="backButtonClicked()"/-->
+    <metadata activeUIState="Common ui state" display="QHD portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+    </metadata>
+</hbdocument>
--- a/satui/satapp/resource/satapp.qrc	Mon May 03 13:01:45 2010 +0300
+++ b/satui/satapp/resource/satapp.qrc	Fri May 14 16:24:46 2010 +0300
@@ -7,6 +7,6 @@
         <file alias="satapp_en">satapp_en.qm</file>
     </qresource>
     <qresource prefix="/icons" >
-        <file>qgn_menu_sat.svg</file>
+        <file>qtg_large_sat.svg</file>
     </qresource>    
 </RCC>
--- a/satui/satapp/satapp.pro	Mon May 03 13:01:45 2010 +0300
+++ b/satui/satapp/satapp.pro	Fri May 14 16:24:46 2010 +0300
@@ -24,7 +24,7 @@
 
 CONFIG += hb
 
-ICON = resource/qgn_menu_sat.svg
+ICON = resource/qtg_large_sat.svg
 symbian: {
     TARGET.CAPABILITY = CAP_GENERAL_DLL
     TARGET.UID3=0x101f4ce0
@@ -53,7 +53,8 @@
                inc/satappgetinkeynote.h \
                inc/csatuiobserver.h \
                inc/csatuiiconhandler.h \
-               inc/satappplaytoneprovider.h
+               inc/satappplaytoneprovider.h \
+               inc/dialogwaiter.h
 
     SOURCES += src/main.cpp \
                src/satappmainhandler.cpp \
@@ -64,7 +65,8 @@
                src/satappgetinkeynote.cpp \
                src/csatuiobserver.cpp \
                src/csatuiiconhandler.cpp \
-               src/satappplaytoneprovider.cpp
+               src/satappplaytoneprovider.cpp \
+               src/dialogwaiter.cpp
     
     BLD_INF_RULES.prj_exports += "rom/satapp.iby CORE_MW_LAYER_IBY_EXPORT_PATH(satapp.iby)" \
                                  "rom/satapp_stub.sis /epoc32/data/z/system/install/satapp_stub.sis" \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/src/dialogwaiter.cpp	Fri May 14 16:24:46 2010 +0300
@@ -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: dialog waiter
+*
+*
+*/
+
+#include "dialogwaiter.h"
+
+HbAction* DialogWaiter::wait()
+{
+    mLoop.exec();
+    HbAction* a=mResult;
+    mResult=0;
+    return a;
+}
+
+void DialogWaiter::done(HbAction* result)
+{
+    mResult=result;
+    mLoop.quit();
+}
+
--- a/satui/satapp/src/satappuiprovider.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/satui/satapp/src/satappuiprovider.cpp	Fri May 14 16:24:46 2010 +0300
@@ -20,7 +20,6 @@
 #include <hbmainwindow.h> // softkey
 #include <hbdocumentloader.h> // application xml
 #include <hbaction.h> // action user response
-#include <hbvalidator.h>
 #include <hbmessagebox.h> // DisplayText, ConfirmSend,
 #include <hbdevicemessagebox.h> // CallControl, SetUpCall
 #include <hblabel.h> // DisplayText, GetInput, SetUpCall
@@ -28,6 +27,10 @@
 #include <hbprogressdialog.h> // SendSms wait note
 #include <hblineedit.h> // For GetInput
 #include <hbinputeditorinterface.h> // GetInput
+#include <hbinputeditorinterface.h>
+#include <hbinputstandardfilters.h>
+#include <hbinputfilter.h> 
+#include <dialogwaiter.h>
 #include "satappview.h" // SetUpMenu, SelectItem
 #include "satappgetinkeynote.h" // GetYesNo immediate digit response
 #include "satappuiprovider.h"
@@ -276,10 +279,12 @@
         composeDialog(mDisplayPopup, aDuration, ESatDialogDisplayText);
 
         TFLOGSTRING(
-        "SATAPP: SatAppUiProvider::showDisplayTextPopup duration before exec")
-        mDisplayPopup->exec();
+        "SATAPP: SatAppUiProvider::showDisplayTextPopup duration before open")
+        DialogWaiter waiter;
+        mDisplayPopup->open(&waiter, SLOT(done(HbAction *)));
+        waiter.wait();
         TFLOGSTRING(
-        "SATAPP: SatAppUiProvider::showDisplayTextPopup duration end exec")
+        "SATAPP: SatAppUiProvider::showDisplayTextPopup duration end open")
 
         delete mDisplayPopup;
         mDisplayPopup = 0;
@@ -311,20 +316,14 @@
         // Set ContentText
         QVariant vContent(aContent);
         mGetInkeyQuery->setValue(vContent);
-
-        // Validation rule, what can be entered
-        HbValidator *val =new HbValidator;
-
+        HbEditorInterface inputMode(mGetInkeyQuery->lineEdit());
         if (ESatDigitOnly == aCharacterSet) {
             // digit mode, digits only (0 9, *, #, and +)
-            mGetInkeyQuery->setInputMode(HbInputDialog::IntInput);
-            // Define what digits can be entered
-            QRegExp r("[0123456789*#+]{1,1}"); // from 1 to 1 digits
-            val->setMasterValidator(new QRegExpValidator(r,0));
-            mGetInkeyQuery->setValidator(val);
-        } else {
+//            inputMode.setUpAsPhoneNumberEditor();
+            inputMode.setFilter(HbPhoneNumberFilter::instance());
+         } else {
             // char mode
-            mGetInkeyQuery->setInputMode(HbInputDialog::TextInput);
+            inputMode.setUpAsLatinAlphabetOnlyEditor();
         }
 
         unsigned int duration = KDefaultSelectionTimeoutMseconds;
@@ -336,12 +335,13 @@
         connect(mGetInkeyQuery->lineEdit(), SIGNAL(textChanged(QString)),
             this, SLOT(updateQueryAction(QString)));
         TFLOGSTRING("SATAPP: SatAppUiProvider::showGetInkeyQuery before pop")
-        mGetInkeyQuery->exec();
+        DialogWaiter waiter;
+        mGetInkeyQuery->open(&waiter, SLOT(done(HbAction *)));
+        waiter.wait();
         TFLOGSTRING("SATAPP: SatAppUiProvider::showGetInkeyQuery end pop")
 
         QString inputString = (mGetInkeyQuery->value()).toString();
         aContent = inputString;
-        delete val;
         delete mGetInkeyQuery;
         mGetInkeyQuery = 0;
     }
@@ -394,7 +394,9 @@
         time.start();
 
         TFLOGSTRING("SATAPP: SatAppUiProvider::showGetYesNoQuery befor pop")
-        mYesNoPopup->exec();
+        DialogWaiter waiter;
+        mYesNoPopup->open(&waiter, SLOT(done(HbAction *)));
+        waiter.wait();
         TFLOGSTRING("SATAPP: SatAppUiProvider::showGetYesNoQuery end pop")
         aDuration = time.elapsed() / KSymbianTimeConvertQtTime;
         TFLOGSTRING2("SATAPP: SatAppUiProvider::showGetYesNoQuery duration out=%d",
@@ -435,22 +437,14 @@
     // Set ContentText
     QVariant vContent(content);
     mGetInputQuery->setValue(vContent);
-
-    // Validation rule, what can be entered
-    HbValidator *val =new HbValidator;
-    QRegExp r;
+    HbEditorInterface inputMode(mGetInputQuery->lineEdit());
     if (ESatDigitOnly == characterSet) {
         // digit mode, digits only (0 9, *, #, and +)
-        mGetInputQuery->setInputMode(HbInputDialog::IntInput);
-        // Define what digits can be entered
-        r.setPattern("[0123456789*#+]{0,255}"); // define what characters can be entered
-        val->setMasterValidator(new QRegExpValidator(r,0));
-        mGetInputQuery->lineEdit()->setValidator(val);
+        inputMode.setFilter(HbPhoneNumberFilter::instance());
     } else {
         // char mode
-        mGetInputQuery->setInputMode(HbInputDialog::TextInput);
+        inputMode.setUpAsLatinAlphabetOnlyEditor();
     }
-
     connect(mGetInputQuery->lineEdit(), SIGNAL(textChanged(QString)),
         this, SLOT(updateQueryAction(QString)));
     mGetInputQuery->lineEdit()->setMaxLength(maxLength);
@@ -476,12 +470,13 @@
     }
 
     TFLOGSTRING("SATAPP: SatAppUiProvider::showGetInputQuery before pop")
-    mGetInputQuery->exec();
+    DialogWaiter waiter;
+    mGetInputQuery->open(&waiter, SLOT(done(HbAction *)));
+    waiter.wait();
     TFLOGSTRING("SATAPP: SatAppUiProvider::showGetInputQuery end pop")
 
     content = (mGetInputQuery->value()).toString();
 
-    delete val;
     delete mGetInputQuery;
     mGetInputQuery = 0;
 
@@ -559,9 +554,11 @@
         mConfirmSendQuery->setText(aText);
         composeDialog(mConfirmSendQuery, 0, ESatDialogConfirmSend);
 
-        TFLOGSTRING("SATAPP: SatAppUiProvider::confirmSend before exec")
-        mConfirmSendQuery->exec();
-        TFLOGSTRING("SATAPP: SatAppUiProvider::confirmSend after exec")
+        TFLOGSTRING("SATAPP: SatAppUiProvider::confirmSend before open")
+        DialogWaiter waiter;
+        mConfirmSendQuery->open(&waiter, SLOT(done(HbAction *)));
+        waiter.wait();
+        TFLOGSTRING("SATAPP: SatAppUiProvider::confirmSend after open")
 
         delete mConfirmSendQuery;
         mConfirmSendQuery = 0;
@@ -683,9 +680,11 @@
         mSetUpCallQuery->setText(alphaId);
         composeDialog(mSetUpCallQuery, 0, ESatDialogSetUpCall);
 
-        TFLOGSTRING("SATAPP: SatAppSetUpCall::showSetUpCallConfirm before exec")
-        mSetUpCallQuery->exec();
-        TFLOGSTRING("SATAPP: SatAppSetUpCall::showSetUpCallConfirm after exec")
+        TFLOGSTRING("SATAPP: SatAppSetUpCall::showSetUpCallConfirm before open")
+        DialogWaiter waiter;
+        mSetUpCallQuery->open(&waiter, SLOT(done(HbAction *)));
+        waiter.wait();
+        TFLOGSTRING("SATAPP: SatAppSetUpCall::showSetUpCallConfirm after open")
 
         delete mSetUpCallQuery;
         mSetUpCallQuery = 0;
@@ -1021,7 +1020,9 @@
     TFLOGSTRING("SATAPP: SatAppUiProvider::showSsErrorNote")
     HbMessageBox *msgBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
     msgBox->setText(hbTrId("txt_sat_sendss_error_note"));
-    msgBox->exec();
+    DialogWaiter waiter;
+    msgBox->open(&waiter, SLOT(done(HbAction *)));
+    waiter.wait();
     delete msgBox;
     msgBox = NULL;
     TFLOGSTRING("SATAPP: SatAppUiProvider::showSsErrorNote exit")
@@ -1047,9 +1048,11 @@
         mConfirmBipQuery->setText(title);
         composeDialog(mConfirmBipQuery, 0, ESatDialogConfirmBip);
 
-        TFLOGSTRING("SATAPP: SatAppUiProvider::showConfirmOpenChannelQuery before exec")
-        mConfirmBipQuery->exec();
-        TFLOGSTRING("SATAPP: SatAppUiProvider::showConfirmOpenChannelQuery after exec")
+        TFLOGSTRING("SATAPP: SatAppUiProvider::showConfirmOpenChannelQuery before open")
+        DialogWaiter waiter;
+        mConfirmBipQuery->open(&waiter, SLOT(done(HbAction *)));
+        waiter.wait();
+        TFLOGSTRING("SATAPP: SatAppUiProvider::showConfirmOpenChannelQuery after open")
 
         delete mConfirmBipQuery;
         mConfirmBipQuery = 0;
@@ -1117,7 +1120,9 @@
     HbMessageBox *msgBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
     msgBox->setText(aText);
     msgBox->setTimeout(KMoSmControlTimeOut);
-    msgBox->exec();
+    DialogWaiter waiter;
+    msgBox->open(&waiter, SLOT(done(HbAction *)));
+    waiter.wait();
     delete msgBox;
     TFLOGSTRING("SATAPP: SatAppUiProvider::showMoSmControlNote exit")
 
@@ -1151,7 +1156,9 @@
     TFLOGSTRING("SATAPP: SatAppUiProvider::showSatInfoNote")
     HbMessageBox *msgBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
     msgBox->setText(aText);
-    msgBox->exec();
+    DialogWaiter waiter;
+    msgBox->open(&waiter, SLOT(done(HbAction *)));
+    waiter.wait();
     delete msgBox;
     msgBox = 0;
     TFLOGSTRING("SATAPP: SatAppUiProvider::showSatInfoNote exit")
--- a/satui/satapp/src/satappview.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/satui/satapp/src/satappview.cpp	Fri May 14 16:24:46 2010 +0300
@@ -105,7 +105,7 @@
     mListWidget = qobject_cast<HbListWidget *>
         ( mUi->docmlLoader()->findWidget(SATAPP_MENUITEM ));
     if (mListWidget && mWindow) {
-        mSoftKeyQuitAction = new HbAction(Hb::QuitAction,this);
+        mSoftKeyQuitAction = new HbAction(Hb::QuitNaviAction,this);
         HbAction *menuAction = menu()->addAction("Exit");
         bool ret = connect(menuAction, SIGNAL(triggered()),
                        mSoftKeyQuitAction, SIGNAL(triggered()));
@@ -141,7 +141,7 @@
         ( mUi->docmlLoader()->findWidget(SATAPP_SELECTITEM ));
 
     if (mSelectListWidget && mWindow) {
-        mSoftKeyBackAction = new HbAction(Hb::BackAction,this);
+        mSoftKeyBackAction = new HbAction(Hb::BackNaviAction,this);
         HbAction *menuBack = menu()->addAction("Back");
         bool ret = connect(menuBack, SIGNAL(triggered()),
                        mSoftKeyBackAction, SIGNAL(triggered()));
@@ -211,7 +211,7 @@
     const QString& aText,
     const QStringList& aMenuItems,
     //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
-    const int aDefaultItem,
+    const int /*aDefaultItem*/,
     unsigned char& aSelection,
     //const HbIcon& aIcon,
     //const CAknIconArray* aItemsIconArray,
@@ -224,10 +224,7 @@
     aRes =  ESatSuccess;
     mSelectItem = true;
     mClickBackSoftkey = false;
-    if (mWindow){
-        mWindow->setCurrentViewIndex(aDefaultItem);
-    }
-    
+
     // Set sub title
     if (!aText.isEmpty()) {
         mSubTitle->setPlainText(aText);
Binary file satui/satapp/tsrc/ut_satapp/sis/utsatapp_template.SIS has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/tsrc/ut_satapp/sis/utsatapp_template.pkg	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,32 @@
+; utsatapp_template.pkg generated by qmake at 2010-02-04T14:06:21
+; This file is generated by qmake and should not be modified by the user
+;
+
+; Language
+&EN
+
+; SIS header: name, uid, version
+#{"utsatapp"},(0xEead1c8b),1,0,0
+
+; Localised Vendor name
+%{"Vendor"}
+
+; Unique Vendor name
+:"Vendor"
+
+; Manual PKG pre-rules from PRO files
+; Default HW/platform dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+ 
+; Default dependency to Qt libraries
+;(0x2001E61C), , , , {"Qt"}
+
+; Executable and default resource files
+"/epoc32/release/armv5/urel/utsatapp.exe"    - "!:\sys\bin\utsatapp.exe"
+"/epoc32/data/z/resource/apps/utsatapp.rsc"    - "!:\resource\apps\utsatapp.rsc"
+"/epoc32/data/z/private/10003a3f/import/apps/utsatapp_reg.rsc"    - "!:\private\10003a3f\import\apps\utsatapp_reg.rsc"
+
+; Manual PKG post-rules from PRO files
--- a/telutils/dialpad/dialpad.pro	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/dialpad.pro	Fri May 14 16:24:46 2010 +0300
@@ -24,18 +24,17 @@
 HEADERS += ../../phonesrv_plat/dialpad_api/inc/dialpad.h \
            ../../phonesrv_plat/dialpad_api/inc/dialpadkeyhandler.h \
            inc/dialpadbutton.h \
-           inc/dialpadbuttonstyle.h \
            inc/dialpadinputfield.h \
            inc/dialpadkeypad.h \
            inc/dialpadmultitaphandler.h\
            inc/dialpadsymbianwrapper.h \
            inc/dialpadbackground.h \
            inc/dialpadvoicemailboxeventfilter.h \
-           inc/dialpadbluetootheventfilter.h
+           inc/dialpadbluetootheventfilter.h \
+           inc/dialpadkeysequenceeventfilter.h
 
 SOURCES += src/dialpad.cpp \
            src/dialpadbutton.cpp \
-           src/dialpadbuttonstyle.cpp \
            src/dialpadinputfield.cpp \
            src/dialpadkeypad.cpp \
            src/dialpadmultitaphandler.cpp\
@@ -43,7 +42,8 @@
            src/dialpadsymbianwrapper.cpp \
            src/dialpadbackground.cpp \
            src/dialpadvoicemailboxeventfilter.cpp \
-           src/dialpadbluetootheventfilter.cpp
+           src/dialpadbluetootheventfilter.cpp \
+           src/dialpadkeysequenceeventfilter.cpp
 
 RESOURCES += dialpad.qrc
 
--- a/telutils/dialpad/inc/dialpadbutton.h	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/inc/dialpadbutton.h	Fri May 14 16:24:46 2010 +0300
@@ -46,6 +46,8 @@
     bool sceneEvent(QEvent *event);
     void polish(HbStyleParameters& params);
 
+    void updatePrimitives();
+
 private:
     DialpadButtonType mButtonType;
 };
--- a/telutils/dialpad/inc/dialpadbuttonstyle.h	Mon May 03 13:01:45 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*!
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Custom button style
-*
-*/
-
-#ifndef DIALPADBUTTONSTYLE_H_
-#define DIALPADBUTTONSTYLE_H_
-
-#include <hbstyle.h>
-
-class DialpadButtonStyle : public HbStyle
-    {
-public:
-    enum ButtonStyle
-    {
-        NormalButtonStyle,
-        FunctionButtonStyle,
-        CallButtonStyle
-    };
-
-public:
-    explicit DialpadButtonStyle();
-    virtual ~DialpadButtonStyle();
-
-    void updatePrimitive(
-        QGraphicsItem *item,
-        HbStyle::Primitive primitive,
-        const QStyleOption *option ) const;
-
-    void setButtonStyle(ButtonStyle style);
-
-private:
-    void setTextColor(QGraphicsItem *item) const;
-    void setIconColor(QGraphicsItem *item, const QColor &color) const;
-
-private:
-    int mButtonStyle;
-    };
-
-#endif /* DIALPADBUTTONSTYLE_H_ */
--- a/telutils/dialpad/inc/dialpadinputfield.h	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/inc/dialpadinputfield.h	Fri May 14 16:24:46 2010 +0300
@@ -46,7 +46,6 @@
 private:
     HbLineEdit* mNumberEditor;
     DialpadButton* mBackspace;
-    DialpadButtonStyle* mFunctionButtonStyle;
     int mHeight;
 };
 
--- a/telutils/dialpad/inc/dialpadkeypad.h	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/inc/dialpadkeypad.h	Fri May 14 16:24:46 2010 +0300
@@ -21,7 +21,6 @@
 #include <hbwidget.h>
 
 class DialpadButton;
-class DialpadButtonStyle;
 class DialpadInputField;
 class DialpadButton;
 class QSignalMapper;
@@ -47,6 +46,8 @@
     void setCallButtonEnabled(bool enabled);
 
     void createButtonGrid();
+    
+    void resetButtons();
 
 protected slots:
     void setButtonTexts();
@@ -68,8 +69,6 @@
     DialpadInputField& mInputField;
     QGraphicsGridLayout* mGridLayout;
     DialpadButton* mButtons[DialpadButtonCount];
-    DialpadButtonStyle* mNormalButtonStyle;
-    DialpadButtonStyle* mCallButtonStyle;
     QSignalMapper* mKeyPressedSignalMapper;
     QSignalMapper* mKeyReleasedSignalMapper;
     QSignalMapper* mKeyClickedSignalMapper;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/inc/dialpadkeysequenceeventfilter.h	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,58 @@
+/*!
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implements key sequence recognition filter for Dialpad.
+*
+*/
+
+#ifndef DIALPADKEYSEQUENCEEVENTFILTER_H
+#define DIALPADKEYSEQUENCEEVENTFILTER_H
+
+#include <qobject>
+
+class Dialpad;
+
+/*!
+    DialpadKeySequenceEventFilter
+    Class provides key sequence recognition and handling.
+*/
+class DialpadKeySequenceEventFilter : public QObject
+{
+    Q_OBJECT
+
+public:
+    explicit DialpadKeySequenceEventFilter(
+        Dialpad* dialpad, 
+        QObject* parent = 0);
+    virtual ~DialpadKeySequenceEventFilter();
+
+public:
+    bool eventFilter(QObject *watched, QEvent *event);
+
+private:
+    /*!
+       \fn bool preValidateKeySequence()
+
+       Checks if the given sequence conforms key sequence command syntax.
+       
+       \return true if sequence conforms key sequence command syntax, 
+       false otherwise.  
+    */
+    bool preValidateKeySequence(const QString &sequence);
+    
+private:
+    /*! Dialpad. Not own. */
+    Dialpad* mDialpad;
+};
+
+#endif // DIALPADKEYSEQUENCEEVENTFILTER_H
--- a/telutils/dialpad/resources/dialpad.css	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/resources/dialpad.css	Fri May 14 16:24:46 2010 +0300
@@ -7,6 +7,12 @@
     fixed-height: var(hb-param-graphic-size-function);
 }
 
+DialpadButton[icon][!text][!additionalText]{
+    layout:icon_button;
+    min-height:6.25un;
+    min-width:6.25un;
+}
+
 /* text and additional text */
 DialpadButton[stretched][!icon][text][additionalText]{
     layout:text_additionalText_horizontal;
@@ -39,13 +45,28 @@
     font-variant:primary;
     text-height:var(hb-param-text-height-title);
     text-line-count-max:1;
-    text-align:left center;    
+    text-align:left center;
 }
 
 DialpadButton[stretched][icon][text][!additionalText]::icon{
     top: -var(hb-param-margin-gene-middle-vertical);
     bottom: var(hb-param-margin-gene-middle-vertical);
     fixed-width: var(hb-param-graphic-size-primary-small);
-    fixed-height: var(hb-param-graphic-size-primary-small);    
+    fixed-height: var(hb-param-graphic-size-primary-small);
+		left: 0;
+    right: 0;
+    size-policy: fixed fixed;    
 }
 
+DialpadInputField > HbLineEdit{
+    text-align: right;
+    size-policy: expanding expanding;
+}
+
+DialpadInputField > HbLineEdit::text{
+    left: -var(hb-param-margin-gene-middle-horizontal);
+    right: var(hb-param-margin-gene-middle-horizontal);
+    top: -var(hb-param-margin-gene-middle-vertical);
+    bottom: var(hb-param-margin-gene-middle-vertical);;
+}
+
--- a/telutils/dialpad/resources/dialpad.dialpadbutton.widgetml	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/resources/dialpad.dialpadbutton.widgetml	Fri May 14 16:24:46 2010 +0300
@@ -4,7 +4,7 @@
     <meshitem src="text" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
     <meshitem src="text" srcEdge="CENTERV" dst="" dstEdge="CENTERV" />
 
-    <meshitem src="additional-text" srcEdge="LEFT" dst="" dstEdge="CENTERH" spacing="3.0un"/>
+    <meshitem src="additional-text" srcEdge="LEFT" dst="" dstEdge="CENTERH" spacing="2.5un"/>
     <meshitem src="additional-text" srcEdge="CENTERV" dst="" dstEdge="CENTERV"/>
 
     <meshitem src="background" srcEdge="TOP" dst="" dstEdge="TOP" />
@@ -20,10 +20,12 @@
 
   <layout name="icon_text_horizontal" type="mesh">
     <meshitem src="text" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+    <meshitem src="text" srcEdge="RIGHT" dst="" dstEdge="RIGHT"/>
     <meshitem src="text" srcEdge="CENTERV" dst="" dstEdge="CENTERV" />
-    
-    <meshitem src="icon" srcEdge="CENTERH" dst="" dstEdge="CENTERH"/>
-    <meshitem src="icon" srcEdge="CENTERV" dst="text" dstEdge="CENTERV" />
+
+    <meshitem src="icon" srcEdge="CENTERH" dst="" dstEdge="CENTERH"/>    
+    <meshitem src="icon" srcEdge="TOP" dst="" dstEdge="TOP"  spacer="spacerTop"/>
+    <meshitem src="icon" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM"  spacer="spacerBottom"/>
     
     <meshitem src="background" srcEdge="TOP" dst="" dstEdge="TOP" />
     <meshitem src="background" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
--- a/telutils/dialpad/src/dialpad.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/src/dialpad.cpp	Fri May 14 16:24:46 2010 +0300
@@ -33,9 +33,9 @@
 #include "dialpadmultitaphandler.h"
 #include "dialpadbackground.h"
 
-static const QString backgroundGraphics("qtg_fr_input_bg");
+static const QString backgroundGraphics("qtg_fr_input_v_bg");
 static const QString backgroundGraphicsH("qtg_fr_input_h_bg");
-static const QString minimizeIcon("qtg_graf_input_swipe");
+static const QString minimizeIcon("qtg_graf_input_v_swipe");
 static const QString minimizeIconH("qtg_graf_input_h_swipe");
 static const qreal DialpadCloseSwipeDistanceV = 0.25; //compared to total height
 static const qreal DialpadCloseSwipeDistanceH = 0.33; // > button width
@@ -133,6 +133,13 @@
     HbStyleLoader::registerFilePath(":/dialpad.css");
     HbStyleLoader::registerFilePath(":/dialpad_color.css");
     HbStyleLoader::registerFilePath(":/dialpad.dialpadbutton.widgetml");
+
+    // grab gestures so that those are not passed to widgets behind dialpad
+    grabGesture(Qt::TapGesture);
+    grabGesture(Qt::TapAndHoldGesture);
+    grabGesture(Qt::PanGesture);
+    grabGesture(Qt::SwipeGesture);
+    grabGesture(Qt::PinchGesture);
 }
 
 Dialpad::~Dialpad()
@@ -197,6 +204,8 @@
 
 void Dialpad::openDialpad()
 {
+    mKeypad->resetButtons();
+    
     if (mIsOpen) {
         return;
     }
--- a/telutils/dialpad/src/dialpadbutton.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/src/dialpadbutton.cpp	Fri May 14 16:24:46 2010 +0300
@@ -15,11 +15,9 @@
 *
 */
 
-#include <hbtextitem.h>
-#include <hbiconitem.h>
-#include <hbstyle.h>
-#include <hbcolorscheme.h>
+
 #include <hbevent.h>
+#include <hbframeitem.h>
 
 #include "dialpadbutton.h"
 
@@ -77,3 +75,38 @@
     HbAbstractButton::polish( params );
 }
 
+void DialpadButton::updatePrimitives()
+{
+    HbPushButton::updatePrimitives();
+
+    HbFrameItem* frame =
+        qgraphicsitem_cast<HbFrameItem*>(HbWidget::primitive("background"));
+
+    if (!frame) {
+        return;
+    }
+
+    QString graphicsName;
+
+    if (!isEnabled()) {
+        graphicsName = "qtg_fr_input_btn_function_disabled";
+    } else if (isDown()) {
+        if (buttonType()==CallButton) {
+            graphicsName = "qtg_fr_btn_green_pressed";
+        } else if (buttonType()==FunctionButton) {
+            graphicsName = "qtg_fr_input_btn_function_pressed";
+        } else {
+            graphicsName = "qtg_fr_input_btn_keypad_pressed";
+        }
+    } else {
+        if (buttonType()==CallButton) {
+            graphicsName = "qtg_fr_btn_green_normal";
+        } else if (buttonType()==FunctionButton) {
+            graphicsName = "qtg_fr_input_btn_function_normal";
+        } else {
+            graphicsName = "qtg_fr_input_btn_keypad_normal";
+        }
+    }
+
+    frame->frameDrawer().setFrameGraphicsName(graphicsName);
+}
--- a/telutils/dialpad/src/dialpadbuttonstyle.cpp	Mon May 03 13:01:45 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*!
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Custom button style
-*
-*/
-
-#include <hbicon.h>
-#include <hbstyleoptionpushbutton.h>
-#include <hbframeitem.h>
-#include <hbframedrawer.h>
-#include "dialpadbuttonstyle.h"
-
-DialpadButtonStyle::DialpadButtonStyle()
-    : mButtonStyle(NormalButtonStyle)
-{
-}
-
-DialpadButtonStyle::~DialpadButtonStyle()
-{
-}
-
-void DialpadButtonStyle::updatePrimitive(
-    QGraphicsItem *item,
-    HbStyle::Primitive primitive,
-    const QStyleOption *option ) const
-{
-    switch(primitive){
-    case P_PushButton_background:{
-        const HbStyleOptionPushButton *opt = 
-            qstyleoption_cast<const HbStyleOptionPushButton *>(option);
-        HbFrameItem *frameItem = qgraphicsitem_cast<HbFrameItem*>( item );
-        if(!frameItem)
-            return;
-
-        frameItem->setZValue(-1.0);
-        if(opt->backgroundFrameDrawer &&!(opt->backgroundFrameDrawer->isNull())) {
-            frameItem->setFrameDrawer( (opt->backgroundFrameDrawer));
-        } else {
-            QString frameGraphicsName;
-            QIcon::Mode mode = QIcon::Disabled;
-            QIcon::State state = QIcon::Off;
-            if (opt->state & QStyle::State_Enabled)
-                mode = QIcon::Normal;
-            if (opt->state & QStyle::State_Active)
-                mode = QIcon::Active;
-            if (opt->state & QStyle::State_Selected)
-                mode = QIcon::Selected;
-            if (opt->state & QStyle::State_On)
-                state = QIcon::On;
-
-            if (mode == QIcon::Disabled && state == QIcon::Off) {
-                frameGraphicsName = "qtg_fr_input_btn_function_disabled";
-            } else if (mode == QIcon::Normal && state == QIcon::On) {
-                if (mButtonStyle==CallButtonStyle) {
-                    frameGraphicsName = "qtg_fr_btn_green_pressed";
-                } else if (mButtonStyle==NormalButtonStyle) {
-                    frameGraphicsName = "qtg_fr_input_btn_keypad_pressed";
-                } else {
-                    frameGraphicsName = "qtg_fr_input_btn_function_pressed";
-                }
-            } else if (mode == QIcon::Selected && state == QIcon::Off) {
-                frameGraphicsName = "qtg_fr_btn_highlight";
-            } else {
-                if (mButtonStyle==CallButtonStyle) {
-                    frameGraphicsName = "qtg_fr_btn_green_normal";
-                } else if (mButtonStyle==NormalButtonStyle) {
-                    frameGraphicsName = "qtg_fr_input_btn_keypad_normal";
-                } else {
-                    frameGraphicsName = "qtg_fr_input_btn_function_normal";
-                }
-            }
-
-            frameItem->frameDrawer().setFrameGraphicsName(frameGraphicsName);
-            if (!opt->background.isNull()) {
-                QString customName = opt->background.iconName(mode, state);
-                frameItem->frameDrawer().setFrameGraphicsName(customName);
-                frameItem->setGeometry(opt->rect);
-                frameItem->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
-                break;
-            }
-            frameItem->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
-        }
-
-        frameItem->setGeometry(opt->rect);
-        break;
-    }
-
-    default:
-        HbStyle::updatePrimitive(item,primitive,option);
-        break;
-    } // switch
-}
-
-void DialpadButtonStyle::setButtonStyle(ButtonStyle style)
-{
-    mButtonStyle = style;
-}
--- a/telutils/dialpad/src/dialpadinputfield.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/src/dialpadinputfield.cpp	Fri May 14 16:24:46 2010 +0300
@@ -23,14 +23,13 @@
 #include <hbdeviceprofile.h>
 
 #include "dialpadinputfield.h"
-#include "dialpadbuttonstyle.h"
 #include "dialpadbutton.h"
 
 static const QString HbBackspaceIcon("qtg_mono_backspace2");
 static const int DialpadAutoRepeatInterval = 150; // ms
 static const int DialpadAutoRepeatDelay = 1000; // ms
 static const qreal DialpadComponentMargin = 0.75; // units
-static const qreal DialpadBackspaceHeight = 9.4; // units
+static const qreal DialpadBackspaceWidth = 9.4; // units
 static const qreal DialpadInputFieldHeight = 6.3; // units
 static const int DialpadMaxEditStringLenght = 100;
 
@@ -41,16 +40,14 @@
     mNumberEditor = new HbLineEdit(this);
     HbEditorInterface editorInterface(mNumberEditor);
     editorInterface.setFilter(HbPhoneNumberFilter::instance());
-    editorInterface.setUpAsPhoneNumberEditor();
-    editorInterface.setConstraints(HbEditorConstraintIgnoreFocus);
+    editorInterface.setInputConstraints(HbEditorConstraintIgnoreFocus);
     mNumberEditor->setMaxLength(DialpadMaxEditStringLenght);
+    mNumberEditor->setMinRows(1);
+    mNumberEditor->setMaxRows(2);
+    mNumberEditor->setAdjustFontSizeToFitHeight(true);
 
     // create backspace button
     mBackspace = new DialpadButton(this);
-    mFunctionButtonStyle = new DialpadButtonStyle();
-    mFunctionButtonStyle->setButtonStyle(
-        DialpadButtonStyle::FunctionButtonStyle);
-    mBackspace->setStyle(mFunctionButtonStyle);
     mBackspace->setButtonType(DialpadButton::FunctionButton); // for css
     mBackspace->setFocusPolicy(Qt::NoFocus);
     mBackspace->setFlag(QGraphicsItem::ItemIsFocusable,false);
@@ -76,19 +73,13 @@
     layout->setContentsMargins(0,0,0,0);
     layout->setSpacing(DialpadComponentMargin* unit);
     // layout parameters
-    mBackspace->setPreferredWidth(DialpadBackspaceHeight * unit);
+    mBackspace->setPreferredWidth(DialpadBackspaceWidth * unit);
     mBackspace->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding);
     setLayout(layout);
-
-    HbFontSpec editFont(HbFontSpec::Primary);
-    // 85% of input field height
-    editFont.setTextHeight(mHeight*0.85);
-    mNumberEditor->setFontSpec(editFont);
 }
 
 DialpadInputField::~DialpadInputField()
 {
-    delete mFunctionButtonStyle;
 }
 
 HbLineEdit& DialpadInputField::editor() const
--- a/telutils/dialpad/src/dialpadkeyhandler.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/src/dialpadkeyhandler.cpp	Fri May 14 16:24:46 2010 +0300
@@ -19,19 +19,28 @@
 #include "dialpadkeyhandler.h"
 #include "dialpadvoicemailboxeventfilter.h"
 #include "dialpadbluetootheventfilter.h"
+#include "dialpadkeysequenceeventfilter.h"
 #include "qtphonesrvlog.h"
 
-DialpadKeyHandler::DialpadKeyHandler(Dialpad *dialPad, HbMainWindow& mainWindow, QObject *parent) : QObject(parent),  mMainWindow(mainWindow)
+DialpadKeyHandler::DialpadKeyHandler(
+    Dialpad *dialPad, HbMainWindow& mainWindow, QObject *parent) 
+    : 
+    QObject(parent),
+	mMainWindow(mainWindow),
+	mVmbxFilter(0),
+	mBtFilter(0),
+	mKeySequenceFilter(0)
 {
     PHONE_TRACE;
-    mVmbxFilter = new DialpadVoiceMailboxEventFilter(dialPad, this);
-    Q_ASSERT(mVmbxFilter != NULL);
-    mBtFilter = new DialpadBluetoothEventFilter(dialPad, this);
-    Q_ASSERT(mBtFilter != NULL);
-
+    
+    mVmbxFilter.reset(new DialpadVoiceMailboxEventFilter(dialPad));
+    mBtFilter.reset(new DialpadBluetoothEventFilter(dialPad));
+    mKeySequenceFilter.reset(new DialpadKeySequenceEventFilter(dialPad));
+    
     // Stack different event filters
-    mMainWindow.installEventFilter(mVmbxFilter);
-    mMainWindow.installEventFilter(mBtFilter);
+    mMainWindow.installEventFilter(mVmbxFilter.data());
+    mMainWindow.installEventFilter(mBtFilter.data());
+    mMainWindow.installEventFilter(mKeySequenceFilter.data());
 }
 
 DialpadKeyHandler::~DialpadKeyHandler()
--- a/telutils/dialpad/src/dialpadkeypad.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/src/dialpadkeypad.cpp	Fri May 14 16:24:46 2010 +0300
@@ -26,7 +26,6 @@
 #include <hblineedit.h>
 
 #include "dialpadkeypad.h"
-#include "dialpadbuttonstyle.h"
 #include "dialpadbutton.h"
 #include "dialpadinputfield.h"
 
@@ -71,10 +70,6 @@
                                         Qt::Key_Backspace);
 
     // create keypad
-    mNormalButtonStyle = new DialpadButtonStyle();
-    mCallButtonStyle = new DialpadButtonStyle();
-    mCallButtonStyle->setButtonStyle(DialpadButtonStyle::CallButtonStyle);
-
     for (int i = 0; i < DialpadButtonCount; i++) {
         int keyCode = DialpadButtonToKeyCodeTable[i];
 
@@ -90,12 +85,10 @@
         button->setObjectName(buttonName);
 
         if (keyCode==Qt::Key_Yes) {
-            button->setStyle(mCallButtonStyle);
             HbIcon callIcon(handsetIcon); // todo correct icon
             button->setIcon(callIcon);
             button->setButtonType(DialpadButton::CallButton); // for css
         } else {
-            button->setStyle(mNormalButtonStyle);
             button->setButtonType(DialpadButton::NumericButton); // for css
         }
 
@@ -136,8 +129,6 @@
 
 DialpadKeypad::~DialpadKeypad()
 {
-    delete mCallButtonStyle;
-    delete mNormalButtonStyle;
 }
 
 void DialpadKeypad::createButtonGrid()
@@ -322,3 +313,10 @@
         }
     }
 }
+
+void DialpadKeypad::resetButtons()
+{
+    for(int i = 0; i < DialpadButtonCount; i++) {
+        mButtons[i]->setDown(false);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/src/dialpadkeysequenceeventfilter.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implements key sequence recognition filter for Dialpad.
+*
+*/
+#include <qdebug>
+#include <qkeyevent>
+#include <hblineedit.h>
+#include <hbstringutil.h>
+#ifdef Q_OS_SYMBIAN
+#include <xqservicerequest.h>
+#include <xqserviceutil.h>
+#endif //Q_OS_SYMBIAN
+#include "dialpadkeysequenceeventfilter.h"
+#include "dialpad.h"
+#include "qtphonesrvlog.h"
+
+/*!
+  DialpadKeySequenceEventFilter::DialpadKeySequenceEventFilter.
+ */
+DialpadKeySequenceEventFilter::DialpadKeySequenceEventFilter(
+    Dialpad* dialpad, QObject* parent) 
+    :
+    QObject(parent), mDialpad(dialpad)
+{
+    PHONE_TRACE;
+}
+
+
+/*!
+  DialpadKeySequenceEventFilter::~DialpadKeySequenceEventFilter.
+ */
+DialpadKeySequenceEventFilter::~DialpadKeySequenceEventFilter()
+{
+    PHONE_TRACE;
+}
+
+
+/*!
+  DialpadKeySequenceEventFilter::eventFilter.
+ */
+bool DialpadKeySequenceEventFilter::eventFilter(QObject *watched, QEvent *event)
+{
+    PHONE_TRACE;
+    Q_UNUSED(watched)
+    
+    const bool eventFiltered = false;
+#ifdef Q_OS_SYMBIAN
+    QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+    const int keyCode = keyEvent->key();
+    const int eventType = event->type();
+    
+    // Code is executed after '#' is pressed as specified in Dialer UI 
+    // specification.
+    QString keySequenceCandidate = HbStringUtil::convertDigitsTo(
+        mDialpad->editor().text(), WesternDigit);
+    if (QEvent::KeyRelease == eventType && 
+        Qt::Key_NumberSign == keyCode &&
+        preValidateKeySequence(keySequenceCandidate)) {
+        XQServiceRequest request(
+            "com.nokia.services.telephony",
+            "executeKeySequence(QString)",
+            true);
+        
+        // Workaround for getting focus back to dialer after service request.
+        XQRequestInfo requestInfo;
+        requestInfo.setBackground(true);
+        request.setInfo(requestInfo);
+        
+        QVariant keySequenceProcessed;
+        request << keySequenceCandidate;
+        bool requestOk = request.send(keySequenceProcessed);
+        if (requestOk && keySequenceProcessed.toBool()) {
+            mDialpad->editor().setText(QString(""));
+        }
+    }
+#else
+    Q_UNUSED(event)
+#endif // Q_OS_SYMBIAN
+    
+    return eventFiltered;
+}
+
+
+/*!
+  DialpadKeySequenceEventFilter::preValidateKeySequence.
+  Checks that key sequence starts with '*#'and ends with '#'.
+ */
+bool DialpadKeySequenceEventFilter::preValidateKeySequence(
+    const QString &sequence)
+{
+    const int KMinimumLength = 4;
+    bool isValid = false;
+    
+    int lengthOfSequence = sequence.length();
+    if (KMinimumLength <= lengthOfSequence) {
+        isValid = 
+            (sequence.at(0) == '*') && 
+            (sequence.at(1) == '#') && 
+            (sequence.at(lengthOfSequence - 1) == '#');
+    }
+    
+    return isValid;
+}
--- a/telutils/dialpad/src/dialpadvoicemailboxeventfilter.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/src/dialpadvoicemailboxeventfilter.cpp	Fri May 14 16:24:46 2010 +0300
@@ -188,7 +188,7 @@
 {
     PHONE_TRACE2("phoneNumber:", phoneNumber);
 #ifdef Q_OS_SYMBIAN
-    XQServiceRequest snd("com.nokia.services.telephony","dial(QString)", false);
+    XQServiceRequest snd("com.nokia.symbian.ICallDial","dial(QString)", false);
     snd << phoneNumber;
     QVariant retValue;
     snd.send(retValue);
--- a/telutils/dialpad/tsrc/dialpadtest/dialpadtestview.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/tsrc/dialpadtest/dialpadtestview.cpp	Fri May 14 16:24:46 2010 +0300
@@ -218,7 +218,7 @@
     msgBox.setText(msg);
     msgBox.setTimeout(3000);
 
-    msgBox.exec();
+    msgBox.show();
 }
 
 void DialpadTestView::handleDial()
@@ -235,7 +235,7 @@
     msgBox.setText(msg);
     msgBox.setTimeout(3000);
 
-    msgBox.exec();
+    msgBox.show();
 }
 
 void DialpadTestView::setTapOutsideDismiss()
--- a/telutils/dialpad/tsrc/unit/runall.cmd	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/runall.cmd	Fri May 14 16:24:46 2010 +0300
@@ -23,6 +23,7 @@
 call runtest.cmd ut_dialpadvoicemailboxeventfilter
 call runtest.cmd mt_keyhandler
 call runtest.cmd ut_dialpadbluetootheventfilter
+call runtest.cmd ut_dialpadkeysequenceeventfilter
 )
 
 @echo off
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/shared/mock_dialpad.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,302 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 <QDebug>
+#include <QtGui>
+#include <hbframedrawer.h>
+#include <hbinstance.h>
+#include <hbeffect.h>
+#include <hbinstance.h>
+#include <hbmainwindow.h>
+#include <hbstyleloader.h>
+#include <hblineedit.h>
+#include <hbapplication.h>
+#include <smcmockclassincludes.h>
+#include "dialpad.h"
+
+static const int DialpadCloseAnimDuration = 200; // ms
+static const int DialpadOpenAnimDuration = 200; // ms
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// Dialpad::Dialpad
+// -----------------------------------------------------------------------------
+//
+Dialpad::Dialpad(  )
+    :
+    mMainWindow(*hbInstance->allMainWindows().at(0)),
+    mBackgroundDrawer(0),
+    mIconDrawer(0),
+    mBackgroundItem(0),
+    mInputField(0),
+    mKeypad(0),
+    mMultitap(0),
+    mMouseButtonPressedDown(false),
+    mOpenTimeLine(DialpadOpenAnimDuration),
+    mCloseTimeLine(DialpadCloseAnimDuration),
+    mAnimationOngoing(false),
+    mOrientation(Qt::Vertical),
+    mIsOpen(false)
+    {
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::Dialpad
+// -----------------------------------------------------------------------------
+//
+Dialpad::Dialpad( const HbMainWindow & mainWindow )
+    :
+    mMainWindow(mainWindow),
+    mBackgroundDrawer(0),
+    mIconDrawer(0),
+    mBackgroundItem(0),
+    mInputField(0),
+    mKeypad(0),
+    mMultitap(0),
+    mMouseButtonPressedDown(false),
+    mOpenTimeLine(DialpadOpenAnimDuration),
+    mCloseTimeLine(DialpadCloseAnimDuration),
+    mAnimationOngoing(false),
+    mOrientation(Qt::Vertical),
+    mIsOpen(false)
+    {
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::~Dialpad
+// -----------------------------------------------------------------------------
+//
+Dialpad::~Dialpad(  )
+    {
+    delete mBackgroundDrawer;
+    delete mIconDrawer;
+    delete mBackgroundItem;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::editor
+// -----------------------------------------------------------------------------
+//
+HbLineEdit & Dialpad::editor(  ) const
+    {
+    SMC_MOCK_METHOD0( HbLineEdit & )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::isOpen
+// -----------------------------------------------------------------------------
+//
+bool Dialpad::isOpen(  ) const
+    {
+    SMC_MOCK_METHOD0( bool )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::openDialpad
+// -----------------------------------------------------------------------------
+//
+void Dialpad::openDialpad(  )
+    {
+    SMC_MOCK_METHOD0( void )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::closeDialpad
+// -----------------------------------------------------------------------------
+//
+void Dialpad::closeDialpad(  )
+    {
+    SMC_MOCK_METHOD0( void )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::setCallButtonEnabled
+// -----------------------------------------------------------------------------
+//
+void Dialpad::setCallButtonEnabled( 
+        bool enabled )
+    {
+    SMC_MOCK_METHOD1( void, bool, enabled )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::setTapOutsideDismiss
+// -----------------------------------------------------------------------------
+//
+void Dialpad::setTapOutsideDismiss( 
+        bool dismiss )
+    {
+    SMC_MOCK_METHOD1( void, bool, dismiss )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::paint
+// -----------------------------------------------------------------------------
+//
+void Dialpad::paint( 
+        QPainter * painter,
+        const QStyleOptionGraphicsItem * option,
+        QWidget * widget )
+    {
+    SMC_MOCK_METHOD3( void, QPainter *, painter, 
+        const QStyleOptionGraphicsItem *, option, 
+        QWidget *, widget )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::sceneEvent
+// -----------------------------------------------------------------------------
+//
+bool Dialpad::sceneEvent( 
+        QEvent * event )
+    {
+    SMC_MOCK_METHOD1( bool, QEvent *, event )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::sceneEventFilter
+// -----------------------------------------------------------------------------
+//
+bool Dialpad::sceneEventFilter( 
+        QGraphicsItem * watched,
+        QEvent * event )
+    {
+    SMC_MOCK_METHOD2( bool, QGraphicsItem *, watched, 
+        QEvent *, event )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::handleSceneEvent
+// -----------------------------------------------------------------------------
+//
+bool Dialpad::handleSceneEvent( 
+        QEvent * event )
+    {
+    SMC_MOCK_METHOD1( bool, QEvent *, event )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::showEvent
+// -----------------------------------------------------------------------------
+//
+void Dialpad::showEvent( 
+        QShowEvent * event )
+    {
+    SMC_MOCK_METHOD1( void, QShowEvent *, event )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::hideEvent
+// -----------------------------------------------------------------------------
+//
+void Dialpad::hideEvent( 
+        QHideEvent * event )
+    {
+    SMC_MOCK_METHOD1( void, QHideEvent *, event )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::closeEvent
+// -----------------------------------------------------------------------------
+//
+void Dialpad::closeEvent( 
+        QCloseEvent * event )
+    {
+    SMC_MOCK_METHOD1( void, QCloseEvent *, event )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::closeAnimValueChanged
+// -----------------------------------------------------------------------------
+//
+void Dialpad::closeAnimValueChanged( 
+        qreal value )
+    {
+    SMC_MOCK_METHOD1( void, qreal, value )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::closeAnimFinished
+// -----------------------------------------------------------------------------
+//
+void Dialpad::closeAnimFinished(  )
+    {
+    SMC_MOCK_METHOD0( void )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::openAnimValueChanged
+// -----------------------------------------------------------------------------
+//
+void Dialpad::openAnimValueChanged( 
+        qreal value )
+    {
+    SMC_MOCK_METHOD1( void, qreal, value )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::openAnimFinished
+// -----------------------------------------------------------------------------
+//
+void Dialpad::openAnimFinished(  )
+    {
+    SMC_MOCK_METHOD0( void )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::orientationChangeStarted
+// -----------------------------------------------------------------------------
+//
+void Dialpad::orientationChangeStarted(  )
+    {
+    SMC_MOCK_METHOD0( void )
+    }
+
+
+// -----------------------------------------------------------------------------
+// Dialpad::orientationChangeFinished
+// -----------------------------------------------------------------------------
+//
+void Dialpad::orientationChangeFinished( 
+        Qt::Orientation current )
+    {
+    SMC_MOCK_METHOD1( void, Qt::Orientation, current )
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/shared/mock_hblineedit.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,381 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 <QDebug>
+#include <QFontMetrics>
+#include <QGraphicsSceneMouseEvent>
+#include <QPainter>
+#include <QTextBlock>
+#include <QTextDocument>
+
+#include <smcmockclassincludes.h>
+#include "hblineedit.h"
+#include "hbabstractedit.h"
+#include "hbwidget.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::HbLineEdit
+// -----------------------------------------------------------------------------
+//
+HbLineEdit::HbLineEdit(QGraphicsItem *parent) 
+{
+    Q_UNUSED(parent)
+}
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::HbLineEdit
+// -----------------------------------------------------------------------------
+//
+HbLineEdit::HbLineEdit( 
+        const QString & text,
+        QGraphicsItem * parent )
+    {
+    Q_UNUSED(text)
+    Q_UNUSED(parent)
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::~HbLineEdit
+// -----------------------------------------------------------------------------
+//
+HbLineEdit::~HbLineEdit(  )
+    {
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::type
+// -----------------------------------------------------------------------------
+//
+int HbLineEdit::type(  ) const
+    {
+    SMC_MOCK_METHOD0( int )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::maxLength
+// -----------------------------------------------------------------------------
+//
+int HbLineEdit::maxLength(  ) const
+    {
+    SMC_MOCK_METHOD0( int )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::setMaxLength
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::setMaxLength( 
+        int length )
+    {
+    SMC_MOCK_METHOD1( void, int, length )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::setMinRows
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::setMinRows( 
+        int rows )
+    {
+    SMC_MOCK_METHOD1( void, int, rows )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::minRows
+// -----------------------------------------------------------------------------
+//
+int HbLineEdit::minRows(  ) const
+    {
+    SMC_MOCK_METHOD0( int )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::setMaxRows
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::setMaxRows( 
+        int rows )
+    {
+    SMC_MOCK_METHOD1( void, int, rows )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::maxRows
+// -----------------------------------------------------------------------------
+//
+int HbLineEdit::maxRows(  ) const
+    {
+    SMC_MOCK_METHOD0( int )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::isExpandable
+// -----------------------------------------------------------------------------
+//
+bool HbLineEdit::isExpandable(  ) const
+    {
+    SMC_MOCK_METHOD0( bool )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::text
+// -----------------------------------------------------------------------------
+//
+QString HbLineEdit::text(  ) const
+    {
+    SMC_MOCK_METHOD0( QString )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::displayText
+// -----------------------------------------------------------------------------
+//
+QString HbLineEdit::displayText(  ) const
+    {
+    SMC_MOCK_METHOD0( QString )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::hasSelectedText
+// -----------------------------------------------------------------------------
+//
+bool HbLineEdit::hasSelectedText(  ) const
+    {
+    SMC_MOCK_METHOD0( bool )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::selectedText
+// -----------------------------------------------------------------------------
+//
+QString HbLineEdit::selectedText(  ) const
+    {
+    SMC_MOCK_METHOD0( QString )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::selectionStart
+// -----------------------------------------------------------------------------
+//
+int HbLineEdit::selectionStart(  ) const
+    {
+    SMC_MOCK_METHOD0( int )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::setSelection
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::setSelection( 
+        int start,
+        int length )
+    {
+    SMC_MOCK_METHOD2( void, int, start, 
+        int, length )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::cursorPosition
+// -----------------------------------------------------------------------------
+//
+int HbLineEdit::cursorPosition() const
+    {
+    SMC_MOCK_METHOD0( int )
+    }
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::setCursorPosition
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::setCursorPosition( 
+        int pos )
+    {
+    SMC_MOCK_METHOD1( void, int, pos )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::echoMode
+// -----------------------------------------------------------------------------
+//
+HbLineEdit::EchoMode HbLineEdit::echoMode(  ) const
+    {
+    SMC_MOCK_METHOD0( HbLineEdit::EchoMode )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::setEchoMode
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::setEchoMode( HbLineEdit::EchoMode echoMode )
+    {
+    SMC_MOCK_METHOD1( void, HbLineEdit::EchoMode, echoMode )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::setCapitalization
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::setCapitalization( 
+        QFont::Capitalization caps )
+    {
+    SMC_MOCK_METHOD1( void, QFont::Capitalization, caps )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::capitalization
+// -----------------------------------------------------------------------------
+//
+QFont::Capitalization HbLineEdit::capitalization(  ) const
+    {
+    SMC_MOCK_METHOD0( QFont::Capitalization )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::setText
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::setText( 
+        const QString & text )
+    {
+    SMC_MOCK_METHOD1( void, const QString &, text )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::HbLineEdit
+// -----------------------------------------------------------------------------
+//
+HbLineEdit::HbLineEdit( 
+        HbLineEditPrivate & dd,
+        QGraphicsItem * parent )
+    {
+    Q_UNUSED(text)
+    Q_UNUSED(parent)
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::inputMethodEvent
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::inputMethodEvent( 
+        QInputMethodEvent * event )
+    {
+    SMC_MOCK_METHOD1( void, QInputMethodEvent *, event )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::keyPressEvent
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::keyPressEvent( 
+        QKeyEvent * event )
+    {
+    SMC_MOCK_METHOD1( void, QKeyEvent *, event )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::keyReleaseEvent
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::keyReleaseEvent( 
+        QKeyEvent * event )
+    {
+    SMC_MOCK_METHOD1( void, QKeyEvent *, event )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::resizeEvent
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::resizeEvent( 
+        QGraphicsSceneResizeEvent * event )
+    {
+    SMC_MOCK_METHOD1( void, QGraphicsSceneResizeEvent *, event )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::canInsertFromMimeData
+// -----------------------------------------------------------------------------
+//
+bool HbLineEdit::canInsertFromMimeData( 
+        const QMimeData * source ) const
+    {
+    SMC_MOCK_METHOD1( bool, const QMimeData *, source )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::insertFromMimeData
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::insertFromMimeData( 
+        const QMimeData * source )
+    {
+    SMC_MOCK_METHOD1( void, const QMimeData *, source )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::focusOutEvent
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::focusOutEvent( 
+        QFocusEvent * event )
+    {
+    SMC_MOCK_METHOD1( void, QFocusEvent *, event )
+    }
+
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::focusInEvent
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::focusInEvent( 
+        QFocusEvent * event )
+    {
+    SMC_MOCK_METHOD1( void, QFocusEvent *, event )
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/shared/mock_xqservicerequest.cpp	Fri May 14 16:24:46 2010 +0300
@@ -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: 
+*
+*/
+#include <QDebug>
+#include <QVariant>
+#include <smcmockclassincludes.h>
+#include <xqservicerequest.h>
+#include <xqrequestinfo.h>
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::XQServiceRequest
+// -----------------------------------------------------------------------------
+//
+XQServiceRequest::XQServiceRequest(  )
+    {
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::XQServiceRequest
+// -----------------------------------------------------------------------------
+//
+XQServiceRequest::XQServiceRequest( 
+        const QString & service,
+        const QString & message,
+        const bool & synchronous )
+    {
+    Q_UNUSED(service)
+    Q_UNUSED(message)
+    Q_UNUSED(synchronous)
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::XQServiceRequest
+// -----------------------------------------------------------------------------
+//
+XQServiceRequest::XQServiceRequest( 
+        const XQServiceRequest & orig )
+    {
+    Q_UNUSED(orig)
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::XQServiceRequest
+// -----------------------------------------------------------------------------
+//
+XQServiceRequest::XQServiceRequest( 
+        const XQAiwInterfaceDescriptor & descriptor,
+        const QString & message,
+        const bool & synchronous )
+    {
+    Q_UNUSED(descriptor)
+    Q_UNUSED(message)
+    Q_UNUSED(synchronous)
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::~XQServiceRequest
+// -----------------------------------------------------------------------------
+//
+XQServiceRequest::~XQServiceRequest(  )
+    {
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::send
+// -----------------------------------------------------------------------------
+//
+bool XQServiceRequest::send(  )
+    {
+    SMC_MOCK_METHOD0( bool )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::send
+// -----------------------------------------------------------------------------
+//
+bool XQServiceRequest::send( 
+        QVariant & retValue )
+    {
+    SMC_MOCK_METHOD1( bool, QVariant &, retValue )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::isNull
+// -----------------------------------------------------------------------------
+//
+bool XQServiceRequest::isNull(  ) const
+    {
+    SMC_MOCK_METHOD0( bool )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::setSynchronous
+// -----------------------------------------------------------------------------
+//
+void XQServiceRequest::setSynchronous( 
+        const bool & synchronous )
+    {
+    SMC_MOCK_METHOD1( void, const bool &, synchronous )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::isSynchronous
+// -----------------------------------------------------------------------------
+//
+bool XQServiceRequest::isSynchronous(  ) const
+    {
+    SMC_MOCK_METHOD0( bool )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::setService
+// -----------------------------------------------------------------------------
+//
+void XQServiceRequest::setService( 
+        const QString & service )
+    {
+    SMC_MOCK_METHOD1( void, const QString &, service )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::service
+// -----------------------------------------------------------------------------
+//
+QString XQServiceRequest::service(  ) const
+    {
+    SMC_MOCK_METHOD0( QString )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::setMessage
+// -----------------------------------------------------------------------------
+//
+void XQServiceRequest::setMessage( 
+        const QString & message )
+    {
+    SMC_MOCK_METHOD1( void, const QString &, message )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::message
+// -----------------------------------------------------------------------------
+//
+QString XQServiceRequest::message(  ) const
+    {
+    SMC_MOCK_METHOD0( QString )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::arguments
+// -----------------------------------------------------------------------------
+//
+const QList <QVariant > & XQServiceRequest::arguments(  ) const
+    {
+    SMC_MOCK_METHOD0( const QList <QVariant > & )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::setArguments
+// -----------------------------------------------------------------------------
+//
+void XQServiceRequest::setArguments( 
+        const QList<QVariant> & arguments )
+    {
+    SMC_MOCK_METHOD1( void, const QList<QVariant> &, arguments )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::latestError
+// -----------------------------------------------------------------------------
+//
+int XQServiceRequest::latestError(  )
+    {
+    SMC_MOCK_METHOD0( int )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::setInfo
+// -----------------------------------------------------------------------------
+//
+void XQServiceRequest::setInfo( 
+        const XQRequestInfo & requestInfo )
+    {
+    SMC_MOCK_METHOD1( void, const XQRequestInfo &, requestInfo )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::info
+// -----------------------------------------------------------------------------
+//
+XQRequestInfo XQServiceRequest::info(  ) const
+    {
+    //SMC_MOCK_METHOD0( XQRequestInfo )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::=
+// -----------------------------------------------------------------------------
+//
+XQServiceRequest & XQServiceRequest::operator=( 
+        const XQServiceRequest & orig )
+    {
+    SMC_MOCK_METHOD1( XQServiceRequest &, const XQServiceRequest &, orig )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::serializeArguments
+// -----------------------------------------------------------------------------
+//
+QByteArray XQServiceRequest::serializeArguments( 
+        const XQServiceRequest & request )
+    {
+    SMC_MOCK_METHOD1( QByteArray, const XQServiceRequest &, request )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::deserializeArguments
+// -----------------------------------------------------------------------------
+//
+void XQServiceRequest::deserializeArguments( 
+        XQServiceRequest & request,
+        const QByteArray & data )
+    {
+    SMC_MOCK_METHOD2( void, XQServiceRequest &, request, 
+        const QByteArray &, data )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::serialize
+// -----------------------------------------------------------------------------
+//
+template <typename Stream > void XQServiceRequest::serialize( 
+        Stream & stream ) const
+    {
+    SMC_MOCK_METHOD1( template <typename Stream > void, Stream &, stream )
+    }
+
+
+// -----------------------------------------------------------------------------
+// XQServiceRequest::deserialize
+// -----------------------------------------------------------------------------
+//
+template <typename Stream > void XQServiceRequest::deserialize( 
+        Stream & stream )
+    {
+    SMC_MOCK_METHOD1( template <typename Stream > void, Stream &, stream )
+    }
+
+void XQServiceRequest::addArg(const QVariant& v)
+{
+    Q_UNUSED(v)
+}
+
+bool XQServiceRequest::handleSharableFileArgs()
+{
+    SMC_MOCK_METHOD0( bool )
+}
--- a/telutils/dialpad/tsrc/unit/unit.pro	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/unit.pro	Fri May 14 16:24:46 2010 +0300
@@ -21,5 +21,6 @@
 SUBDIRS += ut_dialpadmultitaphandler
 SUBDIRS += ut_dialpadvoicemailboxeventfilter
 SUBDIRS += ut_dialpadbluetootheventfilter
+SUBDIRS += ut_dialpadkeysequenceeventfilter
 SUBDIRS += mt_dialpad
 SUBDIRS += mt_keyhandler
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/hblineedit.h	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* 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"
+* which accompanies 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 HBLINEEDIT_H
+#define HBLINEEDIT_H
+
+#include <hbglobal.h>
+#include <hbnamespace.h>
+#include <hbabstractedit.h>
+#include <QFont>
+
+class HbLineEditPrivate;
+
+class HB_WIDGETS_EXPORT HbLineEdit: public QObject
+{
+    Q_OBJECT
+
+    Q_ENUMS(EchoMode)
+
+    Q_PROPERTY(QString text READ text WRITE setText USER true)
+    Q_PROPERTY(QString displayText READ displayText)
+    Q_PROPERTY(int maxLength READ maxLength WRITE setMaxLength)
+    Q_PROPERTY(bool hasSelectedText READ hasSelectedText)
+    Q_PROPERTY(QString selectedText READ selectedText)
+    Q_PROPERTY(int selectionStart READ selectionStart)
+    Q_PROPERTY(int maxRows READ maxRows WRITE setMaxRows)
+    Q_PROPERTY(int minRows READ minRows WRITE setMinRows)
+    Q_PROPERTY(bool expandable READ isExpandable)
+    Q_PROPERTY(EchoMode echoMode READ echoMode WRITE setEchoMode)
+
+public:
+
+    explicit HbLineEdit(QGraphicsItem *parent = 0);
+    explicit HbLineEdit(const QString &text, QGraphicsItem *parent = 0);
+    virtual ~HbLineEdit();
+
+    enum {
+        Type = Hb::ItemType_LineEdit
+    };
+
+    int type() const;
+
+    int maxLength() const;
+    void setMaxLength(int length);
+
+    void setMinRows(int rows);
+    int minRows() const;
+
+    void setMaxRows(int rows);
+    int maxRows() const;
+
+    bool isExpandable() const;
+
+    QString text() const;
+    QString displayText() const;
+
+    bool hasSelectedText() const;
+    QString selectedText() const;
+    int selectionStart() const;
+    void setSelection(int start, int length);
+
+    int cursorPosition() const;
+    void setCursorPosition(int pos);
+
+    enum EchoMode { Normal, NoEcho, Password, PasswordEchoOnEdit };
+    EchoMode echoMode() const;
+    void setEchoMode(EchoMode);
+
+    void setCapitalization ( QFont::Capitalization caps );
+    QFont::Capitalization capitalization () const;
+
+public slots:
+    void setText(const QString &text);
+
+signals:
+    void editingFinished();
+    void textChanged(const QString &text);
+    void selectionChanged();
+
+protected:
+    HbLineEdit(HbLineEditPrivate &dd, QGraphicsItem *parent);
+
+    void inputMethodEvent(QInputMethodEvent *event);
+    void keyPressEvent(QKeyEvent *event);
+    void keyReleaseEvent(QKeyEvent *event);
+
+    void resizeEvent(QGraphicsSceneResizeEvent *event);
+
+    bool canInsertFromMimeData(const QMimeData *source) const;
+    void insertFromMimeData(const QMimeData *source);
+
+    void focusOutEvent ( QFocusEvent * event );
+    void focusInEvent ( QFocusEvent * event );
+private:
+    Q_DISABLE_COPY(HbLineEdit)
+    //Q_DECLARE_PRIVATE_D(d_ptr, HbLineEdit)
+    Q_PRIVATE_SLOT(d_func(), void _q_textChanged())
+};
+
+#endif // HBLINEEDIT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,151 @@
+/*!
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 <QtGui>
+#include <QtTest/QtTest>
+#include <HbMainWindow>
+#include <HbLineEdit>
+#ifdef Q_OS_SYMBIAN
+#include "xqservicerequest.h"
+#endif
+#include "ut_dialpadkeysequenceeventfilter.h"
+#include "dialpadtest.h"
+#include "dialpadkeysequenceeventfilter.h"
+#include "dialpad.h"
+
+UT_DialpadKeySequenceEventFilter::UT_DialpadKeySequenceEventFilter()
+{
+    
+}
+
+UT_DialpadKeySequenceEventFilter::~UT_DialpadKeySequenceEventFilter()
+{
+    
+}
+
+void UT_DialpadKeySequenceEventFilter::init()
+{
+    initialize();
+    
+    SmcDefaultValue<QString>::SetL(QString());
+    HbMainWindow *dummyWindow = NULL;
+    m_dialPad = new Dialpad(*dummyWindow);
+    m_eventFilter = new DialpadKeySequenceEventFilter(m_dialPad);
+}
+
+void UT_DialpadKeySequenceEventFilter::cleanup()
+{
+    reset();
+    
+    SmcDefaultValue<QString>::Reset();
+    delete m_dialPad;
+    m_dialPad = NULL;
+    delete m_eventFilter;
+    m_eventFilter = NULL;
+}
+
+#ifdef Q_OS_SYMBIAN
+void UT_DialpadKeySequenceEventFilter::eventFilterValidKeySequence()
+{
+    const QString KValidKeySequence("*#1#");
+    HbLineEdit lineEdit;
+    EXPECT(Dialpad::editor).returns(&lineEdit);
+    EXPECT(HbLineEdit::text).returns(KValidKeySequence);
+    EXPECT(XQServiceRequest::send).returns(true);
+    QKeyEvent keyEvent(
+        QEvent::KeyRelease,
+        Qt::Key_NumberSign,
+        Qt::NoModifier);
+    bool filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent);
+    QVERIFY(!filtered);
+    QVERIFY(verify());
+}
+
+void UT_DialpadKeySequenceEventFilter::eventFilterNotAKeyEvent()
+{
+    HbLineEdit lineEdit;
+    EXPECT(Dialpad::editor).returns(&lineEdit);
+    EXPECT(XQServiceRequest::send).times(0);
+    QMouseEvent mouseEvent(
+        QEvent::MouseMove,
+        QPoint(),
+        Qt::LeftButton,
+        Qt::LeftButton,
+        Qt::NoModifier);
+    bool filtered = m_eventFilter->eventFilter(m_dialPad, &mouseEvent);
+    QVERIFY(!filtered);
+    QVERIFY(verify());
+}
+
+void UT_DialpadKeySequenceEventFilter::eventFilterNotAHashKey()
+{
+    HbLineEdit lineEdit;
+    EXPECT(Dialpad::editor).returns(&lineEdit);
+    EXPECT(XQServiceRequest::send).times(0);
+    QKeyEvent keyEvent(
+        QEvent::KeyRelease,
+        Qt::Key_Escape,
+        Qt::NoModifier);
+    bool filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent);
+    QVERIFY(!filtered);
+    QVERIFY(verify());
+}
+
+void UT_DialpadKeySequenceEventFilter::eventFilterNotValidKeySequence()
+{
+    const QString KInvalidKeySequence1("*##");
+    const QString KInvalidKeySequence2("#1234#");
+    const QString KInvalidKeySequence3("**1234#");
+    const QString KInvalidKeySequence4("*#1234*");
+    
+    EXPECT(XQServiceRequest::send).times(0);
+    
+    HbLineEdit lineEdit;
+    EXPECT(Dialpad::editor).returns(&lineEdit);
+    EXPECT(HbLineEdit::text).returns(KInvalidKeySequence1);
+    QKeyEvent keyEvent(
+        QEvent::KeyRelease,
+        Qt::Key_NumberSign,
+        Qt::NoModifier);
+    bool filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent);
+    QVERIFY(!filtered);
+    
+    EXPECT(Dialpad::editor).returns(&lineEdit);
+    EXPECT(HbLineEdit::text).returns(KInvalidKeySequence2);
+    filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent);
+    QVERIFY(!filtered);
+    
+    EXPECT(Dialpad::editor).returns(&lineEdit);
+    EXPECT(HbLineEdit::text).returns(KInvalidKeySequence3);
+    filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent);
+    QVERIFY(!filtered);
+    
+    EXPECT(Dialpad::editor).returns(&lineEdit);
+    EXPECT(HbLineEdit::text).returns(KInvalidKeySequence4);
+    filtered = m_eventFilter->eventFilter(m_dialPad, &keyEvent);
+    QVERIFY(!filtered);
+    
+    QVERIFY(verify());
+}
+#endif
+
+int main(int argc, char *argv[])
+{
+    QCoreApplication app(argc, argv);
+    UT_DialpadKeySequenceEventFilter tc;
+    return QTest::qExec(&tc, argc, argv);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.h	Fri May 14 16:24:46 2010 +0300
@@ -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:
+*
+*/
+
+#ifndef UT_DIALPADKEYSEQUENCEEVENTFILTER_H
+#define UT_DIALPADKEYSEQUENCEEVENTFILTER_H
+
+#include <QtTest/QtTest>
+#include <mockservice.h>
+
+class Dialpad;
+class DialpadKeySequenceEventFilter;
+
+class UT_DialpadKeySequenceEventFilter : public QObject, public MockService
+{
+    Q_OBJECT
+
+public:    
+    
+    UT_DialpadKeySequenceEventFilter();
+    ~UT_DialpadKeySequenceEventFilter();
+    
+private slots:
+
+    void init();
+    void cleanup();
+#ifdef Q_OS_SYMBIAN
+    void eventFilterValidKeySequence();
+    void eventFilterNotAKeyEvent();
+    void eventFilterNotAHashKey();
+    void eventFilterNotValidKeySequence();
+#endif
+    
+private:
+    Dialpad *m_dialPad;
+    DialpadKeySequenceEventFilter *m_eventFilter;
+};
+
+#endif  // UT_DIALPADKEYSEQUENCEEVENTFILTER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadkeysequenceeventfilter/ut_dialpadkeysequenceeventfilter.pro	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,50 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#
+
+TEMPLATE = app
+TARGET =
+INCLUDEPATH += . ../../../inc ../../../../../inc ../shared
+
+CONFIG += hb qtestlib
+
+QT -= gui
+
+DEFINES += BUILD_DIALPAD \
+           BUILD_DIALPADKEYHANDLER \
+           XQ_BUILD_XQSERVICE_LIB \
+           BUILD_HB_WIDGETS
+
+symbian {
+    INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+} else:win32 {
+    DESTDIR = ./
+    INCLUDEPATH += ../../../../../phonesrv_plat/dialpad_api/inc
+}
+
+HEADERS += ../../../inc/dialpadkeysequenceeventfilter.h
+SOURCES += ../../../src/dialpadkeysequenceeventfilter.cpp
+
+HEADERS += ut_dialpadkeysequenceeventfilter.h
+SOURCES += ut_dialpadkeysequenceeventfilter.cpp
+
+HEADERS += ../../../../../phonesrv_plat/dialpad_api/inc/dialpad.h
+HEADERS += /epoc32/include/mw/xqservicerequest.h
+SOURCES += ../shared/mock_dialpad.cpp          \
+           ../shared/mock_xqservicerequest.cpp \
+           ../shared/mock_hblineedit.cpp
+
+LIBS += -lmocklib -lsymbianmock -lxqserviceutil
--- a/telutils/dialpad/tsrc/unit/ut_dialpadvoicemailboxeventfilter/ut_dialpadvoicemailboxeventfilter.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadvoicemailboxeventfilter/ut_dialpadvoicemailboxeventfilter.cpp	Fri May 14 16:24:46 2010 +0300
@@ -241,7 +241,7 @@
 #ifdef Q_OS_SYMBIAN
     QVERIFY(mXQServiceConstructed == true);
     QVERIFY(mSendCalled == true);
-    QCOMPARE(mService, QString("com.nokia.services.telephony"));
+    QCOMPARE(mService, QString("com.nokia.symbian.ICallDial"));
     QCOMPARE(mMessage, QString("dial(QString)"));
 #endif
 }
--- a/telutils/telephonyservice/src/ccallinformationimpl.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/telephonyservice/src/ccallinformationimpl.cpp	Fri May 14 16:24:46 2010 +0300
@@ -58,10 +58,11 @@
     CCallInformationImpl* self = new (ELeave) CCallInformationImpl( );     
     CleanupStack::PushL( self );
     
-    CMediatorService* mediatorService = CMediatorService::NewLC( CMediatorService::ECallInfo );    
-    self->ConstructL(mediatorService);    
-        
-    CleanupStack::Pop( 2,self );    
+    CMediatorService* mediatorService = 
+        CMediatorService::NewL( CMediatorService::ECallInfo );    
+    self->ConstructL(mediatorService);
+    
+    CleanupStack::Pop( self );
     TSLOGSTRING("CCallInformationImpl::NewL >>");
     return self;
     }
--- a/telutils/xqtelephonyservice/xqtelephonyservice.pro	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/xqtelephonyservice/xqtelephonyservice.pro	Fri May 14 16:24:46 2010 +0300
@@ -36,9 +36,7 @@
 
     MMP_RULES += defFiles
     
-    LIBS += -lxqservice \
-            -lxqserviceutil \
-            -ltelephonyservice
+    LIBS += -ltelephonyservice
             
     BLD_INF_RULES.prj_exports +=  \
      "$${LITERAL_HASH}include <platform_paths.hrh>" \
--- a/vmbx/vmbxcpplugin/inc/vmbxcpgroup.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/inc/vmbxcpgroup.h	Fri May 14 16:24:46 2010 +0300
@@ -14,40 +14,34 @@
  * Description:  
  *
  */
+
 #ifndef VMBXCPGROUP_H
 #define VMBXCPGROUP_H
 
 // System includes
 #include <cpsettingformitemdata.h>
+#include <voicemailboxdefs.h>
+
 
 // Forward declarations
 class VmbxUiEngine;
 class CpItemDataHelper;
+class HbDataFormModelItem;
 
 // Class declaration
 class VmbxCpGroup : public CpSettingFormItemData
 {
     Q_OBJECT
+
 public:
     
     /*!
         Constructor
     */
     VmbxCpGroup( 
-        HbDataFormModelItem::DataItemType type,
-        const QString &label,
-        const QString &configFile,
-        const HbDataFormModelItem *parent,
         CpItemDataHelper &itemDataHelper);
 
     /*!
-        Constructor
-    */
-     explicit VmbxCpGroup(
-        const QString &configFile = QString(),
-        const HbDataFormModelItem *parent = 0);
-
-    /*!
         Destructor
     */
     ~VmbxCpGroup();
@@ -60,51 +54,52 @@
     */
     void voiceMailboxEngineEntriesUpdated();
 
+    /*!
+        Save default Mailbox
+    */
+    void saveDefaultMailbox(int aIndex);
+
+    /*!
+        Query cs voice number when user click line edit
+    */
+    void queryCsVoiceNumber();
+
+    /*!
+        Query cs video number when user click line edit
+    */
+    void queryCsVideoNumber();
+
+    /*!
+        Update number when vmbx number changed by OTA,OMA etc.
+    */
+    void vmbxNumberChanged(const TVmbxType vmbxType);
+
 private:
+    
+    /*!
+        Preparation before loading
+    */
+    void loadingPreparation(CpItemDataHelper &itemDataHelper);    
+    
+    /*!
+        Update default mailbox
+    */
+    void updateDefaultMailboxToUi();
 
     /*!
        Update Cs voice primary 
     */
-    void updateCsVoicePrimaryToUi();
-
-    /*!
-        Update Cs voice Als
-    */
-    void updateCsVoiceAlsToUi();
+    void updateCsVoice1ToUi();
 
     /*!
        update Cs video primary
     */
-    void updateCsVideoPrimaryToUi();
-    
-    /*! 
-       NOTICE: IT IS POSSIBLE THAT PS SERVICES WILL NOT BE DISPLAYED 
-       BY VMBX CONTROL PANEL WHEN WE GET THE NEW UI CONCEPT!!!!!! 
-       In that case this is not needed
-    */
-
-    /*!
-       update Ps services
-    */
-    void updatePsServicesToUi();
-
-    /*!
-        Update default mailbox
-    */
-    void updateDefaultMailboxToUi();
+    void updateCsVideo1ToUi();
     
     /*!
         Update all mailboxes
     */
     void updateAllMailboxesToUi();
-    
-private:
-
-    /*!
-        Preparation before loading
-    */
-    void loadingPreparation(CpItemDataHelper &itemDataHelper);
-
 
 private:
     
@@ -112,16 +107,13 @@
     VmbxUiEngine *mUiEngine;
 
     // Not own.
-    CpSettingFormItemData *mEditorCsVoice1;
-    
+    CpSettingFormItemData *mDefaultMailboxEditor;    
+
     // Not own.
-    CpSettingFormItemData *mEditorCsVoice2;
-    
+    HbDataFormModelItem *mCsVoice1Editor;
+
     // Not own.
-    CpSettingFormItemData *mEditorCsVideo1;
-
-    // Contained pointers not own.
-    QList<CpSettingFormItemData *> mPsServiceEditors;
+    HbDataFormModelItem *mCsVideo1Editor;
 };
 
 #endif // VMBXCPGROUP_H
--- a/vmbx/vmbxcpplugin/inc/vmbxcpplugin.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/inc/vmbxcpplugin.h	Fri May 14 16:24:46 2010 +0300
@@ -14,6 +14,7 @@
  * Description:
  *
  */
+
 #ifndef VMBXCPPLUGIN_H
 #define VMBXCPPLUGIN_H
 
@@ -29,11 +30,13 @@
 {
     Q_OBJECT
     Q_INTERFACES(CpPluginInterface)
+    
 public:
     /*!
         Constructor
     */
     VmbxCpPlugin();
+    
     /*!
         Destructor
     */
@@ -46,4 +49,5 @@
     virtual QList<CpSettingFormItemData *> createSettingFormItemData(
         CpItemDataHelper &itemDataHelper) const;
 };
+
 #endif // VMBXCPPLUGIN_H
--- a/vmbx/vmbxcpplugin/inc/vmbxuiengine.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/inc/vmbxuiengine.h	Fri May 14 16:24:46 2010 +0300
@@ -20,6 +20,7 @@
 // System includes
 #include <QObject>
 #include <mvoicemailboxobserver.h>
+#include <voicemailboxdefs.h>
 
 // Forward declarations
 class CVoiceMailbox;
@@ -31,6 +32,7 @@
     Q_OBJECT
             
 public:
+    
     /*!
         Constructor.
     */
@@ -48,21 +50,43 @@
         @param aValue Retrieved number.
     */
     void getCsVoice1Number(QString &aValue);
-    /*!
-        Getter method for voice ALS number of Voice Mailbox.
-        @param aValue Retrieved number.
-    */
-    void getCsVoice2Number(QString &aValue);
     
     /*!
         Getter method for primary video number of Voice Mailbox.
         @param aValue Retrieved number.
     */
     void getCsVideo1Number(QString &aValue);
+    
+    /*!
+        Set number when cs voice number has been edited on UI.
+        @param aValue New value.
+    */
+    void setCsVoice1Number( const QString &aValue );
+    
+    /*!
+        Set number when cs voice number has been edited on UI.
+        @param aValue New value.
+    */
+    void setCsVideo1Number( const QString &aValue );
+    
+    /*!
+        If video mailbox supported.
+    */    
+    bool isVideoSupport();
+
+    /*!
+        If voice mailbox is writable.
+    */
+    bool isVoiceWritable();
+
+    /*!
+        If video mailbox is writable.
+    */
+    bool isVideoWritable();
+
       
     // Add new Getter methods for other voice mailbox types
-    
-    // From MVoiceMailboxObserver
+
     /*!
         From MVoiceMailboxObserver
         Observer callback for number/address change notification
@@ -72,21 +96,32 @@
     */
     void HandleNotifyL(const CVoiceMailboxEntry &aVmbxEntry);
 
+    /*!
+        Query number when cs voice number has been edited on UI.
+        @param aValue New value.
+    */
+    int queryVoiceNumber(QString &aValue);
+
+    /*!
+        Query number when cs video number has been edited on UI.
+        @param aValue New value.
+    */
+    int queryVideoNumber(QString &aValue);
+    
+    /*!
+        Request notify when VMBX number changed
+        @param  aNotifyOnActiveLineOnly  Only active line or NOT
+     */
+    void notifyVmbxNumberChange(bool aNotifyOnActiveLineOnly);
+
 signals:
 
     /*!
         Signal emitted when voice mailbox data has been updated.
     */
-    void voiceMailboxEngineEntriesUpdated(); 
-
-public slots:
+    void voiceMailboxEngineEntriesUpdated(const TVmbxType vmbxType); 
 
-    /*!
-        Slot for signal when number has been edited on UI.
-        @param aValue New value.
-    */
-    void uiCsVoice1Changed( const QString &aValue );
-     
+
 private: // New Method    
     
     /*!
@@ -105,6 +140,14 @@
     void setNumber(const TVoiceMailboxParams &aParam, 
                    const QString &aValue);
 
+    /*!
+        Query method for voice mailbox number.
+        @param aParam Identify voice mailbox type
+        @param aValue Retrieved number.
+    */
+    int queryNumber(const TVoiceMailboxParams &aParam, QString &aValue);
+    
+
 private:
 
     /*!
--- a/vmbx/vmbxcpplugin/rom/rom.pri	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/rom/rom.pri	Fri May 14 16:24:46 2010 +0300
@@ -17,5 +17,6 @@
 symbian: {
   BLD_INF_RULES.prj_exports += \
   "$${LITERAL_HASH}include<platform_paths.hrh>" \
-  "rom/vmbxcpplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vmbxcpplugin.iby)"
+  "rom/vmbxcpplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vmbxcpplugin.iby)" \
+   "rom/vmbxcpplugin_stub.sis /epoc32/data/z/system/install/vmbxcpplugin_stub.sis"
 }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/rom/vmbxcpplugin.pkg	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,25 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+
+; Language
+&EN
+
+; SIS header: name, uid, version
+#{"vmbxcpplugin"},(0x20029F5D),10, 1, 0, TYPE=PU
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+; DEPLOYMENT
+"\epoc32\release\armv5\urel\vmbxcpplugin.dll"    - "!:\sys\bin\vmbxcpplugin.dll"
+"\sf\mw\phonesrv\vmbx\vmbxcpplugin\qmakepluginstubs\vmbxcpplugin.qtplugin"    - "!:\resource\qt\plugins\controlpanel\vmbxcpplugin.qtplugin"
+
--- a/vmbx/vmbxcpplugin/rom/vmbxcpplugin_stub.pkg	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/rom/vmbxcpplugin_stub.pkg	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 ;
-; Copyright (c) 2009 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"
@@ -13,6 +13,7 @@
 ;
 ; Description:  For packing vmbxcpplugin stub.
 ;
+; Languages
 &EN
 
 ; Header
@@ -25,4 +26,5 @@
 :"Nokia"
 
 ;Files
-""-"z:\sys\bin\vmbxcpplugin.dll"
+""-"!:\sys\bin\vmbxcpplugin.dll"
+""-"!:\resource\qt\plugins\controlpanel\vmbxcpplugin.qtplugin"
Binary file vmbx/vmbxcpplugin/rom/vmbxcpplugin_stub.sis has changed
--- a/vmbx/vmbxcpplugin/src/vmbxcpgroup.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/src/vmbxcpgroup.cpp	Fri May 14 16:24:46 2010 +0300
@@ -16,47 +16,56 @@
  */
 
 // System includes
+#include <QApplication>
+#include <QLocale>
+#include <QTranslator>
+#include <QStringList>
 #include <cpitemdatahelper.h>
+#include <hblineedit.h>
 
 // User includes
 #include "vmbxuiengine.h"
 #include "vmbxcpgroup.h"
 #include "loggerutil.h"
 
-/*!
-    Constructor
-*/
-VmbxCpGroup::VmbxCpGroup(
-    const QString &configFile,
-    const HbDataFormModelItem *parent) :
-        CpSettingFormItemData(parent),
-        mUiEngine(0),
-        mEditorCsVoice1(0),
-        mEditorCsVoice2(0),
-        mEditorCsVideo1(0)
-{
-    Q_UNUSED(configFile);
-}
+// custom dataform type
+#define CustomDataFormType \
+    static_cast<HbDataFormModelItem::DataItemType>(HbDataFormModelItem::CustomItemBase)
 
 /*!
     Constructor
 */
 VmbxCpGroup::VmbxCpGroup(
-    HbDataFormModelItem::DataItemType type,
-    const QString &label,
-    const QString &configFile,
-    const HbDataFormModelItem *parent,
     CpItemDataHelper &itemDataHelper) :
-        CpSettingFormItemData(type, label, parent),
-        mUiEngine(0),
-        mEditorCsVoice1(0),
-        mEditorCsVoice2(0),
-        mEditorCsVideo1(0)
+        CpSettingFormItemData(HbDataFormModelItem::GroupItem,
+        hbTrId("txt_phone_subhead_call_mbx"), NULL),
+        mUiEngine(NULL),
+        mDefaultMailboxEditor(NULL),
+        mCsVoice1Editor(NULL),
+        mCsVideo1Editor(NULL)
 { 
     _DBGLOG2("VmbxCpGroup::VmbxCpGroup label=",label)
-    Q_UNUSED(configFile);
+    // Localization file loading
+    QTranslator translator; 
+    QString lang = QLocale::system().name();
+    QString path = "z:/resource/qt/translations/";
+
+    bool translatorLoaded = translator.load(path + "telephone_cp_" + lang);
+    _DBGLOG("VmbxCpGroup::VmbxCpGroup translator loaded")
+    if (translatorLoaded && qApp) {
+        qApp->installTranslator(&translator);
+        _DBGLOG("VmbxCpGroup::VmbxCpGroup translator installed")
+    }
+
     mUiEngine = new VmbxUiEngine();
     loadingPreparation(itemDataHelper);
+
+    // Request notify when VMBX number changed
+    mUiEngine->notifyVmbxNumberChange(true);
+    bool ret = connect(mUiEngine,
+            SIGNAL(voiceMailboxEngineEntriesUpdated(const TVmbxType)), 
+            this, SLOT(vmbxNumberChanged(const TVmbxType)));
+    _DBGLOG2("VmbxCpGroup::VmbxCpGroup connect ret=", ret)
     _DBGLOG("VmbxCpGroup::VmbxCpGroup <")
 }
 
@@ -73,51 +82,110 @@
 }
 
 /*!
+    Notification slot for engine signal about 
+    Voice Mailbox entries' changes
+*/
+void VmbxCpGroup::voiceMailboxEngineEntriesUpdated()
+{
+    _DBGLOG("VmbxCpGroup::voiceMailboxEngineEntriesUpdated")
+    // Consider is there need to pass the actual modified data 
+    // and mailbox type enum to slot (here) so only needed 
+    // data can be updated.
+    updateAllMailboxesToUi();
+}
+
+/*!
+    Save default mailbox when user selection finished
+*/ 
+void VmbxCpGroup::saveDefaultMailbox(int aIndex)
+{
+    if (0 == aIndex){
+        _DBGLOG("VmbxCpGroup::saveDefaultMailbox voice")
+    }else if(1 == aIndex){
+        _DBGLOG("VmbxCpGroup::saveDefaultMailbox video")
+    }else{
+        _DBGLOG("VmbxCpGroup::saveDefaultMailbox other")
+    }
+}
+
+/*!
     Preparation before loading
 */
 void VmbxCpGroup::loadingPreparation(CpItemDataHelper &itemDataHelper)
 {   
     _DBGLOG("VmbxCpGroup::loadingPreparation >")
     
-    QString newUiValue("");
-
-    mEditorCsVoice1 = new CpSettingFormItemData(
-            HbDataFormModelItem::TextItem, tr("Call mailbox") );
-    _DBGLOG("VmbxCpGroup::loadingPreparation appendChild")
-    itemDataHelper.addConnection( 
-        mEditorCsVoice1, 
-        SIGNAL(textChanged(QString)), 
-        mUiEngine, SLOT(uiCsVoice1Changed(QString))
-        );
+    // #Following code is reserved for TB10.2
+    // Create default mailbox selection
     // appendChild takes ownership
-    appendChild(mEditorCsVoice1);
+    //if (mUiEngine->isVideoSupport()){
+    //    mDefaultMailboxEditor = new CpSettingFormItemData(
+    //            HbDataFormModelItem::ComboBoxItem, 
+    //            hbTrId("Default mailbox"),
+    //            this);
+        //itemDataHelper.addConnection( 
+        //    mDefaultMailboxEditor, SIGNAL(currentIndexChanged(int)), 
+        //    mUiEngine, SLOT(saveCsVoice1Number()));
+        //QStringList list;
+        //list.append(hbTrId("Voice"));
+        //list.append(hbTrId("Video"));
+        //mDefaultMailboxEditor->setContentWidgetData("items", QVariant(list));
+        //appendChild(mDefaultMailboxEditor);          
+    //}
+
+    // Create cs voice primary editor
+    mCsVoice1Editor= new HbDataFormModelItem(
+        CustomDataFormType,
+        hbTrId("txt_phone_setlabel_default_mbx_val_voice"));
+    _DBGLOG("VmbxCpGroup::loadingPreparation appendChild voice1 mailbox")
 
-    // Todo: add csVoice2 if ALS supported
-    
-    // Todo: add video only if supported
-    //mEditorCsVideo1 = new CpSettingFormItemData(
-    //        HbDataFormModelItem::TextItem, tr("Video mailbox") );
-    //_DBGLOG("VmbxCpGroup::loadingPreparation appendChild")
-    //appendChild( mEditorCsVideo1 );
-    
-    // TODO: get all ps addresses AND THEIR NAMES from engine and add ui controls
-    //for them
-    // Set UI control pointers to mPsServiceEditors
+    QString voice1Number;
+    mUiEngine->getCsVoice1Number(voice1Number);
+    // Show voice line1 number on lineedit
+    mCsVoice1Editor->setContentWidgetData(QString("text"), voice1Number);
+    // Connect ui editing signals and allow ui control
+    // eidting if vmbx allows editing
+    if (mUiEngine->isVoiceWritable()) {
+         // When click the lineedit, the query dialog would pop up.
+        itemDataHelper.addConnection(mCsVoice1Editor, SIGNAL(clicked()),
+            this, SLOT(queryCsVoiceNumber()));
+    } else {
+        // If not writable, Dim the voice editor
+        mCsVoice1Editor->setEnabled(false);
+    }
+    // Add child
+    appendChild(mCsVoice1Editor);
+ 
+    // Create cs video primary editor
+    if (mUiEngine->isVideoSupport()){
+        mCsVideo1Editor= new HbDataFormModelItem(
+            CustomDataFormType,
+            hbTrId("txt_phone_setlabel_default_mbx_val_video"));
+        _DBGLOG("VmbxCpGroup::loadingPreparation appendChild video1 mailbox")
+        QString video1Number;
+        mUiEngine->getCsVideo1Number(video1Number);
+        // Show video line1 number on lineedit
+        mCsVideo1Editor->setContentWidgetData(QString("text"), video1Number);
+        // Check video editing permission and connect signal
+        if (mUiEngine->isVideoWritable()) {
+            itemDataHelper.addConnection(mCsVideo1Editor, SIGNAL(clicked()),
+                this, SLOT(queryCsVideoNumber()));
+        } else {
+            // If not writable, Dim the Video editor
+            mCsVideo1Editor->setEnabled(false);
+        }
+        appendChild( mCsVideo1Editor );
+    }
+    // TODO: Create cs voice als editor
+    // TODO: Create cs video als editor    
+    // TODO: Create all ps service editors
     
     updateAllMailboxesToUi();
-    
-    // TODO: below connect ui editing signals and allow ui control
-    // eidting if vmbx allows editing
                 
     // TODO: here check CS ALS editing permission and connnect signal
     // and enable editing 
         
-    // TODO: here check video editing permission and connect signal
-    // if ok
-
     // No need for Video ALS on UI, implement later if necessary.
-
-    
     // Editing of PS Services is not allowed by default, disable ui editing
     // for them.
 
@@ -125,61 +193,6 @@
 }
 
 /*!
-   Update Cs voice primary 
-*/
-void VmbxCpGroup::updateCsVoicePrimaryToUi()
-{
-    _DBGLOG("VmbxCpGroup::updateCsVoicePrimaryToUi")
-    if (mEditorCsVoice1 && mUiEngine) {
-        QString newUiValue("");
-        mUiEngine->getCsVoice1Number(newUiValue);
-        mEditorCsVoice1->setContentWidgetData("text", newUiValue);
-    }
-}
-
-/*!
-    Update Cs voice Als
-*/
-void VmbxCpGroup::updateCsVoiceAlsToUi()
-{
-    _DBGLOG("VmbxCpGroup::updateCsVoiceAlsToUi")
-    if (mEditorCsVoice2 && mUiEngine){
-        QString newUiValue("");
-        mUiEngine->getCsVoice1Number(newUiValue );
-        _DBGLOG2("VmbxCpGroup::updateCsVoiceAlsToUi newUiValue=", newUiValue)
-        mEditorCsVoice2->setContentWidgetData("text", newUiValue );
-    }
-}
-
-/*!
-   update Cs video primary
-*/
-void VmbxCpGroup::updateCsVideoPrimaryToUi()
-{
-    _DBGLOG("VmbxCpGroup::updateCsVideoPrimaryToUi >")
-    if (mEditorCsVideo1 && mUiEngine){
-        QString newUiValue("");
-        mUiEngine->getCsVideo1Number(newUiValue);
-        _DBGLOG2("VmbxCpGroup::updateCsVideoPrimaryToUi newUiValue=", \
-            newUiValue)
-        mEditorCsVideo1->setContentWidgetData("text", newUiValue);
-    }
-    _DBGLOG("VmbxCpGroup::updateCsVideoPrimaryToUi <")
-}
-
-/*!
-   update Ps services
-*/
-void VmbxCpGroup::updatePsServicesToUi()
-{
-    _DBGLOG("VmbxCpGroup::updatePsServicesToUi >")
-    // Set values from engine to ui
-    // NOTICE: IT IS POSSIBLE THAT PS SERVICES WILL NOT BE DISPLAYED BY VMBX 
-    // CONTROL PANEL WHEN WE GET THE NEW UI CONCEPT!!!!!!
-    _DBGLOG("VmbxCpGroup::updatePsServicesToUi <")
-}
-
-/*!
     Update default mailbox
 */
 void VmbxCpGroup::updateDefaultMailboxToUi()
@@ -189,34 +202,109 @@
     // length of the default mailbox
     // and reset the default mailbox type selection to "none" if it is.
     // If you do so, remember to save the new value to engine.
+    if (mDefaultMailboxEditor && mUiEngine) {
+        // TODO: Need a new API to save default mailbox
+    }
     _DBGLOG("VmbxCpGroup::updateDefaultMailboxToUi <")
 }
 
 /*!
+   Update Cs voice primary 
+*/
+void VmbxCpGroup::updateCsVoice1ToUi()
+{
+    _DBGLOG("VmbxCpGroup::updateCsVoice1ToUi")
+    if (mCsVoice1Editor && mUiEngine) {
+        QString newUiValue("");
+        mUiEngine->getCsVoice1Number(newUiValue);
+        _DBGLOG2("VmbxCpGroup::updateCsVoice1ToUi\
+             newUiValue=", newUiValue)
+        mCsVoice1Editor->setContentWidgetData("text", newUiValue);
+    }
+}
+
+/*!
+   update Cs video primary
+*/
+void VmbxCpGroup::updateCsVideo1ToUi()
+{
+    _DBGLOG("VmbxCpGroup::updateCsVideo1ToUi >")
+    if (mCsVideo1Editor && mUiEngine){
+        QString newUiValue("");
+        mUiEngine->getCsVideo1Number(newUiValue);
+        _DBGLOG2("VmbxCpGroup::updateCsVideo1ToUi\
+             newUiValue=", newUiValue)
+        mCsVideo1Editor->setContentWidgetData("text", newUiValue);
+    }
+    _DBGLOG("VmbxCpGroup::updateCsVideo1ToUi <")
+}
+
+/*!
     Update all mailboxes
 */
 void VmbxCpGroup::updateAllMailboxesToUi()
 {
     _DBGLOG("VmbxCpGroup::updateAllMailboxesToUi >")
-    updateCsVoicePrimaryToUi();
-    //updateCsVoiceAlsToUi();
-    //updateCsVideoPrimaryToUi();
-    //updatePsServicesToUi();
-    //updateDefaultMailboxToUi();
+    updateCsVoice1ToUi();
+    if (mUiEngine->isVideoSupport()) {
+        updateDefaultMailboxToUi();
+        updateCsVideo1ToUi();
+    }
     _DBGLOG("VmbxCpGroup::updateAllMailboxesToUi <")
 } 
 
 /*!
-    Notification slot for engine signal about 
-    Voice Mailbox entries' changes
+    Query voice number
 */
-void VmbxCpGroup::voiceMailboxEngineEntriesUpdated()
+void VmbxCpGroup::queryCsVoiceNumber()
 {
-    _DBGLOG("VmbxCpGroup::voiceMailboxEngineEntriesUpdated")
-    // Consider is there need to pass the actual modified data 
-    // and mailbox type enum to slot (here) so only needed 
-    // data can be updated.
-    updateAllMailboxesToUi();
+    _DBGLOG("VmbxCpGroup::queryCsVoiceNumber >")
+    mCsVoice1Editor->setEnabled(false);
+    QString number;
+    int result = mUiEngine->queryVoiceNumber(number);
+    _DBGLOG2("VmbxCpGroup::queryCsVoiceNumber result=", result)
+    if (KErrNone == result) {
+        mCsVoice1Editor->setContentWidgetData(QString("text"), number);
+        _DBGLOG2("VmbxCpGroup::queryCsVoiceNumber >, number=", number)
+        mUiEngine->setCsVoice1Number(number);   
+    }
+    mCsVoice1Editor->setEnabled(true);
+    _DBGLOG("VmbxCpGroup::queryCsVoiceNumber <")
 }
 
-//End of file
\ No newline at end of file
+/*!
+    Query video number
+*/
+void VmbxCpGroup::queryCsVideoNumber()
+{
+    _DBGLOG("VmbxCpGroup::queryCsVideoNumber >")
+    mCsVideo1Editor->setEnabled(false);
+    QString number;
+    int result = mUiEngine->queryVideoNumber(number);
+    _DBGLOG2("VmbxCpGroup::queryCsVideoNumber  result=", result)
+    if (KErrNone == result) {
+        mCsVideo1Editor->setContentWidgetData(QString("text"), number);
+        _DBGLOG2("VmbxCpGroup::queryCsVideoNumber >, number=", number)
+        mUiEngine->setCsVideo1Number(number);
+    }
+    mCsVideo1Editor->setEnabled(true);
+    _DBGLOG("VmbxCpGroup::queryCsVideoNumber <")
+}
+
+/*!
+    Update number when vmbx number changed by OTA,OMA etc.
+*/
+void VmbxCpGroup::vmbxNumberChanged(const TVmbxType vmbxType)
+{
+    _DBGLOG("VmbxCpGroup::vmbxNumberChanged >")
+    // Update cs voice number
+    if (EVmbxVoice == vmbxType) {
+       updateCsVoice1ToUi();
+    // Update cs video number
+    } else if (EVmbxVideo == vmbxType) {
+       updateCsVideo1ToUi();
+    }
+    _DBGLOG("VmbxCpGroup::vmbxNumberChanged <")
+}
+
+//End of file
--- a/vmbx/vmbxcpplugin/src/vmbxcpplugin.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/src/vmbxcpplugin.cpp	Fri May 14 16:24:46 2010 +0300
@@ -29,7 +29,7 @@
 */
 VmbxCpPlugin::VmbxCpPlugin()
 {
-    _DBGLOG( "VmbxCpPlugin::VmbxCpPlugin()" )
+    _DBGLOG("VmbxCpPlugin::VmbxCpPlugin()")
 }
 
 /*!
@@ -37,7 +37,7 @@
 */
 VmbxCpPlugin::~VmbxCpPlugin()
 {
-_DBGLOG( "VmbxCpPlugin::~VmbxCpPlugin()" )
+    _DBGLOG("VmbxCpPlugin::~VmbxCpPlugin()")
 }
 
 /*!
@@ -46,19 +46,11 @@
 QList<CpSettingFormItemData *> VmbxCpPlugin::createSettingFormItemData(
     CpItemDataHelper &itemDataHelper) const
 {
-    _DBGLOG( "VmbxCpPlugin::createSettingFormItemData" )
-
-    QList<CpSettingFormItemData *> itemList;
-
-    VmbxCpGroup *itemData = new VmbxCpGroup(
-         HbDataFormModelItem::GroupItem,
-         QString("Voice Mailbox"),
-         QString("vmbxcpplugin.cpcfg"),
-         0,
-         itemDataHelper );
-     itemList << itemData;
-     return itemList;
+    _DBGLOG("VmbxCpPlugin::createSettingFormItemData")
+    QList<CpSettingFormItemData *> ret;
+    ret.append(new VmbxCpGroup(itemDataHelper));
     _DBGLOG("VmbxCpPlugin::createSettingFormItemData created")
+    return ret;
 }
 Q_EXPORT_PLUGIN2(VmbxCpPlugin, VmbxCpPlugin);
 
--- a/vmbx/vmbxcpplugin/src/vmbxuiengine.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/src/vmbxuiengine.cpp	Fri May 14 16:24:46 2010 +0300
@@ -18,7 +18,6 @@
 // System includes
 #include <cvoicemailbox.h>
 #include <cvoicemailboxentry.h>
-#include <voicemailboxdefs.h>
 
 // User includes
 #include "vmbxuiengine.h"
@@ -27,8 +26,7 @@
 /*!
     Constructor
 */
-VmbxUiEngine::VmbxUiEngine() :
-    mVmbxEngine(NULL)
+VmbxUiEngine::VmbxUiEngine() : mVmbxEngine(NULL)
 { 
     _DBGLOG("VmbxUiEngine::VmbxUiEngine >")
     QT_TRAP_THROWING(mVmbxEngine = CVoiceMailbox::NewL());
@@ -41,6 +39,7 @@
 VmbxUiEngine::~VmbxUiEngine()
 {
     _DBGLOG( "VmbxUiEngine::~VmbxUiEngine >")
+    mVmbxEngine->NotifyVmbxNumberChangeCancel();
     delete mVmbxEngine;
     mVmbxEngine = NULL;
     _DBGLOG( "VmbxUiEngine::~VmbxUiEngine <")
@@ -52,7 +51,6 @@
 void VmbxUiEngine::getCsVoice1Number(QString &aValue)
 {
     _DBGLOG("VmbxUiEngine::getCsVoice1Number >")
-
     TVoiceMailboxParams vmbxParams;
     vmbxParams.iType = EVmbxVoice;
     vmbxParams.iLineType = EVmbxAlsLine1;
@@ -62,20 +60,6 @@
 }
 
 /*!
-    Getter method for voice ALS number of Voice Mailbox.
-*/
-void VmbxUiEngine::getCsVoice2Number(QString &aValue)
-{
-    _DBGLOG("VmbxUiEngine::getCsVoice2Number >")
-    TVoiceMailboxParams vmbxParams;
-    vmbxParams.iType = EVmbxVoice;
-    vmbxParams.iLineType = EVmbxAlsLine2;
-    vmbxParams.iServiceId = KVmbxServiceVoice;
-    getNumber(vmbxParams, aValue);
-    _DBGLOG2("VmbxUiEngine::getCsVoice2Number < , string=", aValue)
-}
-
-/*!
     Getter method for primary video number of Voice Mailbox.
 */
 void VmbxUiEngine::getCsVideo1Number(QString &aValue)
@@ -90,18 +74,126 @@
 }
 
 /*!
-    Callback from voice mailbox engine when number has been updated
-    This method notifies the UI to refresh its data.
+    Set number when cs voice number has been edited on UI.
+    @param aValue New value.
 */
-void VmbxUiEngine::uiCsVoice1Changed(const QString& aValue)
+void VmbxUiEngine::setCsVoice1Number(const QString &aValue)
 {
-    _DBGLOG2("VmbxUiEngine::uiCsVoice1Changed >, value=",aValue)
+    _DBGLOG2("VmbxUiEngine::setCsVoice1Number >, value=",aValue)
     TVoiceMailboxParams vmbxParams;
     vmbxParams.iType = EVmbxVoice;
     vmbxParams.iLineType = EVmbxAlsLine1;
     vmbxParams.iServiceId = KVmbxServiceVoice;
     setNumber(vmbxParams, aValue);
-    _DBGLOG("VmbxUiEngine::uiCsVoice1Changed <");
+    _DBGLOG("VmbxUiEngine::setCsVoice1Number <");
+}
+
+/*!
+    Set number when cs video number has been edited on UI.
+    @param aValue New value.
+*/
+void VmbxUiEngine::setCsVideo1Number(const QString &aValue)
+{
+    _DBGLOG2("VmbxUiEngine::setCsVideo1Number >, value=",aValue)
+    TVoiceMailboxParams vmbxParams;
+    vmbxParams.iType = EVmbxVideo;
+    vmbxParams.iLineType = EVmbxAlsLine1;
+    vmbxParams.iServiceId = KVmbxServiceVideo;
+    setNumber(vmbxParams, aValue);
+    _DBGLOG("VmbxUiEngine::setCsVideo1Number <");
+}
+
+/*!
+    If video mailbox supported.
+*/
+bool VmbxUiEngine::isVideoSupport()
+{
+    _DBGLOG("VmbxUiEngine::isVideoSupport >")
+    // video support
+    bool isVideoSupport(false);
+    TVoiceMailboxParams vmbxParams;
+    vmbxParams.iType = EVmbxVideo;
+    vmbxParams.iLineType = EVmbxAlsLine1;
+    vmbxParams.iServiceId = KVmbxServiceVideo;
+    isVideoSupport = mVmbxEngine->CheckConfiguration(vmbxParams,
+        EVmbxVideoMailboxSupported);
+    _DBGLOG2("VmbxUiEngine::isVideoSupport ", isVideoSupport);
+    return isVideoSupport;
+}
+
+/*!
+    If voice mailbox allow to write.
+*/
+bool VmbxUiEngine::isVoiceWritable()
+{
+    _DBGLOG("VmbxUiEngine::isVoiceWritable >")
+    bool isVoiceWritable(false);
+    TVoiceMailboxParams vmbxParams;
+    vmbxParams.iType = EVmbxVoice;
+    vmbxParams.iLineType = EVmbxAlsLine1;
+    vmbxParams.iServiceId = KVmbxServiceVoice;
+    isVoiceWritable = mVmbxEngine->CheckConfiguration(vmbxParams,
+        EVmbxChangeNbrAllowedOnUi);
+    _DBGLOG2("VmbxUiEngine::isVoiceWritable <", isVoiceWritable);
+    return isVoiceWritable;
+}
+
+/*!
+    If video mailbox allow to write.
+*/
+bool VmbxUiEngine::isVideoWritable()
+{
+    _DBGLOG( "VmbxUiEngine::isVideoWritable >")
+    bool isVideoWritable(false);
+    TVoiceMailboxParams vmbxParams;
+    vmbxParams.iType = EVmbxVideo;
+    vmbxParams.iLineType = EVmbxAlsLine1;
+    vmbxParams.iServiceId = KVmbxServiceVideo;
+    isVideoWritable = mVmbxEngine->CheckConfiguration(vmbxParams,
+        EVmbxChangeNbrAllowedOnUi);
+    _DBGLOG2("VmbxUiEngine::isVoiceWritable >", isVideoWritable);
+    return isVideoWritable;
+}
+
+/*!
+    queryVoiceNumber
+*/
+int VmbxUiEngine::queryVoiceNumber(QString &aValue)
+{
+    _DBGLOG2("VmbxUiEngine::queryVoiceNumber >, value=",aValue)
+    TVoiceMailboxParams vmbxParams;
+    vmbxParams.iType = EVmbxVoice;
+    vmbxParams.iServiceId = KVmbxServiceVoice;
+    int result = queryNumber(vmbxParams, aValue);
+    _DBGLOG2("VmbxUiEngine::queryVoiceNumber <, value=", aValue)
+    return result;
+}
+
+/*!
+    queryVideoNumber
+*/
+int VmbxUiEngine::queryVideoNumber(QString &aValue)
+{
+    _DBGLOG2("VmbxUiEngine::queryVideoNumber >, value=", aValue)
+    TVoiceMailboxParams vmbxParams;
+    vmbxParams.iType = EVmbxVideo;
+    vmbxParams.iServiceId = KVmbxServiceVideo;
+    int result = queryNumber(vmbxParams, aValue);
+    _DBGLOG2("VmbxUiEngine::queryVideoNumber <, value=", aValue)
+    return result;
+}
+
+/*!
+    Request notify when VMBX number changed
+ */
+void VmbxUiEngine::notifyVmbxNumberChange(bool aNotifyOnActiveLineOnly)
+{
+    _DBGLOG2("VmbxUiEngine::notifyVmbxNumberChange >, OnActiveLineOnly=", 
+             aNotifyOnActiveLineOnly)
+    QT_TRAP_THROWING(mVmbxEngine->NotifyVmbxNumberChangeL
+                                 (*this, aNotifyOnActiveLineOnly));
+    _DBGLOG2("VmbxUiEngine::notifyVmbxNumberChange <, OnActiveLineOnly=", 
+             aNotifyOnActiveLineOnly)
 }
 
 /*!
@@ -110,14 +202,10 @@
 */
 void VmbxUiEngine::HandleNotifyL(const CVoiceMailboxEntry &aVmbxEntry)
 {
-    _DBGLOG( "VmbxUiEngine::HandleNotifyL")
-    Q_UNUSED(aVmbxEntry);
-    // Consider is there need to pass the actual modified data 
-    // and mailbox type enum to slot.
-    //
-    // Issue the notification request to vmbxengine, that is missing
-    // at the moment !
-    emit voiceMailboxEngineEntriesUpdated();
+    _DBGLOG( "VmbxUiEngine::HandleNotifyL >")
+    TVmbxType type = aVmbxEntry.VoiceMailboxType();
+    emit voiceMailboxEngineEntriesUpdated(type);
+    _DBGLOG( "VmbxUiEngine::HandleNotifyL <")
 }
 
 /*!
@@ -135,7 +223,7 @@
         result = vmbxEntry->GetVmbxNumber( entryNumber );
         _DBGLOG3("VmbxUiEngine::getNumber, GetVmbxNumber result=", 
             result,
-            " but ignore code and allow returing of an empty string to UI");
+            " but ignore code and allow returning of an empty string to UI");
         aValue = QString::fromUtf16 (entryNumber.Ptr(), entryNumber.Length());
     }
     delete vmbxEntry;
@@ -152,31 +240,52 @@
     _DBGLOG("VmbxUiEngine::setNumber >")
         
     CVoiceMailboxEntry* vmbxEntry = NULL;
-    TInt result = mVmbxEngine->GetStoredEntry(aParam, vmbxEntry);    
-    _DBGLOG2("VmbxUiEngine::setNumber, GetStoredEntry result=", result);
-    if ( KErrNone != result ){
-        QT_TRAP_THROWING(vmbxEntry = CVoiceMailboxEntry::NewL());
-        vmbxEntry->SetServiceId(aParam.iServiceId);
-        vmbxEntry->SetVoiceMailboxType(aParam.iType);
-        vmbxEntry->SetVmbxAlsLineType(aParam.iLineType);
-        // Service name for cs is basically the one in service table,
-        // but in this case it's not used for anything by vmbx.
-        // So let's not set anything as name...fix if problems arise
-    }
+    QT_TRAP_THROWING(vmbxEntry = CVoiceMailboxEntry::NewL());
+    vmbxEntry->SetServiceId(aParam.iServiceId);
+    vmbxEntry->SetVoiceMailboxType(aParam.iType);
+    vmbxEntry->SetVmbxAlsLineType(aParam.iLineType);
+    _DBGLOG2("VmbxUiEngine::setNumber, SetVmbxNumber aValue=", aValue);
     _DBGLOG( "VmbxUiEngine::setNumber: cast to TPtrC")
     TPtrC newNumber( 
         reinterpret_cast<const TUint16*>( aValue.utf16() ),
         aValue.length() );
-    result = vmbxEntry->SetVmbxNumber( newNumber );
-    _DBGLOG2("VmbxUiEngine::setNumber, SetVmbxNumber result=", result);
-
-    if ( KErrNone == result ){
+    int result = vmbxEntry->SetVmbxNumber( newNumber );
+    if ( KErrNone == result ) {
         result = mVmbxEngine->SaveEntry( *vmbxEntry );
         _DBGLOG2("VmbxUiEngine::setNumber, SaveEntry result=", result);
     } 
     delete vmbxEntry;
-    // TODO: handle error here
+    vmbxEntry = 0;
     _DBGLOG("VmbxUiEngine::setNumber <");
 }
 
+/*!
+    Query method for voice mailbox number.
+*/
+int VmbxUiEngine::queryNumber(const TVoiceMailboxParams &aParam, 
+    QString &aValue)
+{
+    _DBGLOG2("VmbxUiEngine::queryNumber >, value=", aValue)
+    getNumber(aParam, aValue);
+    CVoiceMailboxEntry *vmbxEntry = NULL;
+    int result(0);
+    if (aValue.length() > 0) {
+        result = mVmbxEngine->QueryChangeEntry(aParam, vmbxEntry);
+    } else {
+        result = mVmbxEngine->QueryNewEntry(aParam, vmbxEntry);
+    }
+    if (KErrNone == result && vmbxEntry) {
+        TPtrC entryNumber(KNullDesC);
+        result = vmbxEntry->GetVmbxNumber(entryNumber);
+        _DBGLOG3("VmbxUiEngine::queryNumber, GetVmbxNumber result=", 
+            result,
+            " but ignore code and allow returing of an empty string to UI");
+        aValue = QString::fromUtf16(entryNumber.Ptr(), entryNumber.Length());
+    } 
+    delete vmbxEntry;
+    vmbxEntry = NULL;
+    _DBGLOG2("VmbxUiEngine::queryNumber <, value=", aValue)
+    return result;
+}
+
 //End of file
--- a/vmbx/vmbxcpplugin/tsrc/inc/ut_vmbxcpplugin.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/tsrc/inc/ut_vmbxcpplugin.h	Fri May 14 16:24:46 2010 +0300
@@ -21,19 +21,10 @@
 
 // System includes
 #include <QtTest/QtTest>
-#include <QString>
-#include <QStringList>
-#include <QSignalSpy>
-#include <QMetaType>
 #include <QObject>
 
-
-// Class forwards
-class VmbxCpPlugin;
-class VmbxCpGroup;
-
 /*!
-    Mt_vmbxEngine module test class.
+    Ut_vmbxCpPlugin module test class.
 
     Tests Ut_vmbxCpPlugin interface.
     See cpp file for more information.
@@ -46,35 +37,17 @@
 {
     Q_OBJECT
 
-public:
-    Ut_vmbxCpPlugin();
-
-    virtual ~Ut_vmbxCpPlugin();
-
 private slots: 
 
     /*!
-        Called before the first testfunction is executed.
-    */
-    void initTestCase();
-
-    /*!
-        Called after the last testfunction has been executed.
-    */
-    void cleanupTestCase();
-
-    /*!
         Test method in VmbxCpPlugin
     */
     void testCreateSettingFormItemData();
-
-private:  //data
-
+    
     /*!
-        Own.
-    */
-    VmbxCpPlugin *mCpPlugin;
-
+        Test method in VmbxCpGroup
+    */    
+    void testCreateVmbxCpGroup();
 };
 
 #endif // _UT_VMBXCPPLUGIN_H
--- a/vmbx/vmbxcpplugin/tsrc/inc/ut_vmbxuiengine.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/tsrc/inc/ut_vmbxuiengine.h	Fri May 14 16:24:46 2010 +0300
@@ -24,6 +24,9 @@
 // Class forwards
 class VmbxUiEngine;
 
+static TInt globalExpRet;
+static QString globalNumber;
+
 /*!
     Ut_VmbxUiEngine module test class.
 
@@ -36,24 +39,15 @@
 {
     Q_OBJECT
 
-public:
-    Ut_VmbxUiEngine();
-
-    virtual ~Ut_VmbxUiEngine();
-
 private slots: 
 
     void initTestCase();
-
     void cleanupTestCase();
-
-    void testGetCsVoice1Number();
-
-    void testGetCsVoice2Number();
-
-    void testGetCsVideo1Number();
     
-    void testUiCsVoice1Changed();
+    void testCsVoice1Number();
+    void testCsVideo1Number();      
+    void testIsVideoSupport();
+    void testHandleNotifyL();
     
 private:  //data
 
--- a/vmbx/vmbxcpplugin/tsrc/src/main.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/tsrc/src/main.cpp	Fri May 14 16:24:46 2010 +0300
@@ -37,13 +37,11 @@
     int result = QTest::qExec(&tcUiEngine, 3, pass);
     qDebug("ut_vmbxuiengine result %d", result);
 
-
     qDebug("ut_vmbxcpplugin");
     Ut_vmbxCpPlugin tcCpPlugin;
     pass[2] = "c:\\logs\\vmbx\\ut_vmbxcpplugin.txt";
     result = QTest::qExec(&tcCpPlugin, 3, pass);
     qDebug("ut_vmbxcpplugin result=%d", result);
-
     
     qDebug("main() <");
     return result;
--- a/vmbx/vmbxcpplugin/tsrc/src/ut_dummyvoicemailbox.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/tsrc/src/ut_dummyvoicemailbox.cpp	Fri May 14 16:24:46 2010 +0300
@@ -19,6 +19,8 @@
 #include <QtTest/QtTest>
 #include <cvoicemailbox.h>
 #include <cvoicemailboxentry.h>
+// For global export return value
+#include "ut_vmbxuiengine.h"
 
 // ============================ MEMBER FUNCTIONS =============================
 
@@ -114,14 +116,14 @@
 //
 // ---------------------------------------------------------------------------
 //
- TInt CVoiceMailbox::GetStoredEntry( 
+TInt CVoiceMailbox::GetStoredEntry( 
     const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry) const
     {
-    qDebug("DummyVoiceMailbox::GetStoredEntry <>");
+    qDebug("DummyVoiceMailbox::GetStoredEntry >");
     Q_UNUSED(aParams);
     TRAPD (err, aEntry = CVoiceMailboxEntry::NewL());    
     qDebug("DummyVoiceMailbox::GetStoredEntry err %d<", err);
-    return err;
+    return globalExpRet;
     }
 
 // ---------------------------------------------------------------------------
@@ -129,11 +131,11 @@
 // Destructor
 // ---------------------------------------------------------------------------
 //
- TInt CVoiceMailbox::SaveEntry(const CVoiceMailboxEntry& aEntry)
+TInt CVoiceMailbox::SaveEntry(const CVoiceMailboxEntry& aEntry)
     {
     qDebug("DummyVoiceMailbox::SaveEntry <>");
     Q_UNUSED(aEntry);
-    return KErrNone;
+    return globalExpRet;
     }
 
 // ---------------------------------------------------------------------------
@@ -141,13 +143,13 @@
 //
 // ---------------------------------------------------------------------------
 //
- TInt CVoiceMailbox::QueryNewEntry(
+TInt CVoiceMailbox::QueryNewEntry(
         const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry)
     {
     qDebug("DummyVoiceMailbox::QueryNewEntry <>");
     Q_UNUSED(aParams);
     TRAPD (err, aEntry = CVoiceMailboxEntry::NewL());
-    return err;
+    return globalExpRet;
     }
 
 // ---------------------------------------------------------------------------
@@ -155,13 +157,13 @@
 //
 // ---------------------------------------------------------------------------
 //
- TInt CVoiceMailbox::QueryChangeEntry( 
+TInt CVoiceMailbox::QueryChangeEntry( 
         const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry)
     {
     qDebug("DummyVoiceMailbox::QueryChangeEntry <>");
     Q_UNUSED(aParams);
     TRAPD (err, aEntry = CVoiceMailboxEntry::NewL());
-    return err;
+    return globalExpRet;
     }
 
 // ---------------------------------------------------------------------------
@@ -169,14 +171,14 @@
 //
 // ---------------------------------------------------------------------------
 //
- TInt CVoiceMailbox::QueryVmbxType(
+TInt CVoiceMailbox::QueryVmbxType(
                             TVoiceMailboxParams& aParams )
     {
     qDebug("DummyVoiceMailbox::QueryVmbxType <>");
     aParams.iType = EVmbxVoice;
     aParams.iServiceId = KVmbxServiceVoice;
     aParams.iLineType = EVmbxAlsLine1;
-    return KErrNone;
+    return globalExpRet;
     }
 
 // ---------------------------------------------------------------------------
@@ -184,7 +186,7 @@
 //
 // ---------------------------------------------------------------------------
 //
- void CVoiceMailbox::NotifyVmbxNumberChangeL(
+void CVoiceMailbox::NotifyVmbxNumberChangeL(
     MVoiceMailboxObserver& aObserver, const TBool aNotifyOnActiveLineOnly )
     {
     qDebug("DummyVoiceMailbox::NotifyVmbxNumberChangeL <>");
@@ -197,7 +199,7 @@
 //
 // ---------------------------------------------------------------------------
 //
- void CVoiceMailbox::NotifyVmbxNumberChangeCancel()
+void CVoiceMailbox::NotifyVmbxNumberChangeCancel()
     {
     qDebug("DummyVoiceMailbox::NotifyVmbxNumberChangeCancel <>");
     }
@@ -207,13 +209,13 @@
 //
 // ---------------------------------------------------------------------------
 //
- TBool CVoiceMailbox::CheckConfiguration(
+TBool CVoiceMailbox::CheckConfiguration(
     const TVoiceMailboxParams& aParams, const TInt aFlags )
     {
     qDebug("DummyVoiceMailbox::CheckConfiguration <>");
     Q_UNUSED(aParams);
     Q_UNUSED(aFlags);
-    return ETrue;
+    return globalExpRet;
     }
 
 // ---------------------------------------------------------------------------
@@ -221,7 +223,7 @@
 //
 // ---------------------------------------------------------------------------
 //
- TInt CVoiceMailbox::GetServiceIds( RIdArray& aProfileIds ) const
+TInt CVoiceMailbox::GetServiceIds( RIdArray& aProfileIds ) const
     {
     qDebug("DummyVoiceMailbox::GetServiceIds <>");
     Q_UNUSED(aProfileIds);
@@ -234,12 +236,12 @@
 //
 // ---------------------------------------------------------------------------
 //
- TInt CVoiceMailbox::SaveProvisionedEntry( 
+TInt CVoiceMailbox::SaveProvisionedEntry( 
                                 const CVoiceMailboxEntry& aEntry)
     {
     qDebug("DummyVoiceMailbox::SaveProvisionedEntry <>");
     Q_UNUSED(aEntry);
-    return KErrNone;
+    return globalExpRet;
     }
 
 // End of file
--- a/vmbx/vmbxcpplugin/tsrc/src/ut_dummyvoicemailboxentry.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/tsrc/src/ut_dummyvoicemailboxentry.cpp	Fri May 14 16:24:46 2010 +0300
@@ -18,6 +18,8 @@
 // System includes
 #include <QtTest/QtTest>
 #include <cvoicemailboxentry.h>
+// For global value
+#include "ut_vmbxuiengine.h"
 
 // CONSTANTS
 
@@ -148,23 +150,12 @@
 // Get number or address of the entry instance
 // ---------------------------------------------------------------------------
 //
-EXPORT_C TInt CVoiceMailboxEntry::GetVmbxNumber( TPtrC& aVmbxNumber ) const
+TInt CVoiceMailboxEntry::GetVmbxNumber( TPtrC& aVmbxNumber ) const
     {
     qDebug("DummyVoiceMailboxEntry::GetVmbxNumber >");
-    TInt result( KErrNotFound );
-    if ( ivmbxNumber )
-        {
-        aVmbxNumber.Set( ivmbxNumber->Des() );
-        qDebug("DummyVoiceMailboxEntry::GetVmbxNumber");
-        result = KErrNone;
-        }
-    else
-        {
-        qDebug("DummyVoiceMailboxEntry::GetVmbxNumber:KNullDesC");
-        aVmbxNumber.Set( KNullDesC );
-        }
-    qDebug("DummyVoiceMailboxEntry::GetVmbxNumber <");
-    return result;
+    aVmbxNumber.Set(globalNumber.utf16());
+    qDebug("DummyVoiceMailboxEntry::GetVmbxNumber %d", globalExpRet);
+    return globalExpRet;
     }
 
 // ---------------------------------------------------------------------------
@@ -172,25 +163,12 @@
 // Set number or address of the entry instance
 // ---------------------------------------------------------------------------
 //
-EXPORT_C TInt CVoiceMailboxEntry::SetVmbxNumber( const TDesC& aVmbxNumber )
+TInt CVoiceMailboxEntry::SetVmbxNumber( const TDesC& aVmbxNumber )
     {
     qDebug("DummyVoiceMailboxEntry::SetVmbxNumber >");
-    TInt result( KErrNoMemory );
-    if ( aVmbxNumber.Length() > KVmbxMaxNumberLength )
-        {
-        result = KErrArgument;
-        }
-    else
-        {
-        delete ivmbxNumber;
-        ivmbxNumber = aVmbxNumber.Alloc(); // Returns NULL if fails.
-        if ( ivmbxNumber )
-            {
-            result = KErrNone;
-            }
-        }
-    qDebug("DummyVoiceMailboxEntry::SetVmbxNumber <"); 
-    return result;
+    globalNumber = QString::fromUtf16(aVmbxNumber.Ptr(), aVmbxNumber.Length());
+    qDebug("DummyVoiceMailboxEntry::SetVmbxNumber %d", globalExpRet);
+    return globalExpRet;
     }
 
 // ---------------------------------------------------------------------------
@@ -198,7 +176,7 @@
 // Get Brand Id of the entry instance
 // ---------------------------------------------------------------------------
 //
-EXPORT_C TInt CVoiceMailboxEntry::GetBrandId( TPtrC8& aBrandId ) const
+TInt CVoiceMailboxEntry::GetBrandId( TPtrC8& aBrandId ) const
     {
     qDebug("DummyVoiceMailboxEntry::GetBrandId >");
     TInt result( KErrNotFound ); 
--- a/vmbx/vmbxcpplugin/tsrc/src/ut_vmbxcpplugin.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/tsrc/src/ut_vmbxcpplugin.cpp	Fri May 14 16:24:46 2010 +0300
@@ -16,74 +16,43 @@
 */
 
 // System includes
-#include <QtGui>
 #include <e32base.h>
+#include <cpitemdatahelper.h>
 
 // User includes
 #include "vmbxcpplugin.h"
+#include "vmbxcpgroup.h"
 #include "ut_vmbxcpplugin.h"
 
-// load plugin
-#include <cpitemdatahelper.h>
-
 /*!
-    Ut_vmbxCpPlugin::Ut_vmbxCpPlugin
-    Default constructor, remember to null new members here.
+    Ut_vmbxCpPlugin::createSettingFormItemData
 */
-Ut_vmbxCpPlugin::Ut_vmbxCpPlugin()
+void Ut_vmbxCpPlugin::testCreateSettingFormItemData()
 {
-    qDebug("Ut_vmbxCpPlugin::Ut_vmbxCpPlugin >");
-    qDebug("Ut_vmbxCpPlugin::Ut_vmbxCpPlugin <");
-}
-
-/*!
-    Ut_vmbxCpPlugin::~Ut_vmbxCpPlugin
-*/
-Ut_vmbxCpPlugin::~Ut_vmbxCpPlugin()
-{
-    qDebug("Ut_vmbxCpPlugin::~Ut_vmbxCpPlugin >");
-    qDebug("Ut_vmbxCpPlugin::~Ut_vmbxCpPlugin <");
+    CpItemDataHelper itemDataHelper;
+    VmbxCpPlugin *plugin = new VmbxCpPlugin();
+    QVERIFY(plugin);
+    QList<CpSettingFormItemData *> list;
+    list = plugin->createSettingFormItemData(itemDataHelper);
+    QVERIFY2(0 != list[0], "createSettingFormItemData failed");
+    delete plugin;
+    plugin = NULL;
 }
 
 /*!
-    Ut_vmbxCpPlugin::initTestCase
-    QTestLib initialization method, called for each test case.
+    VmbxCpGroup construtor and destroctor
 */
-void Ut_vmbxCpPlugin::initTestCase()
-{
-    qDebug("Ut_vmbxCpPlugin::initTestCase >");
-    mCpPlugin = new VmbxCpPlugin();
-    QVERIFY(mCpPlugin);
-    qDebug("Ut_vmbxCpPlugin::initTestCase <");
-}
-
-/*!
-    Ut_vmbxCpPlugin::cleanupTestCase
-    QTestLib cleanup method, called for each test case.
-*/
-void Ut_vmbxCpPlugin::cleanupTestCase()
+void Ut_vmbxCpPlugin::testCreateVmbxCpGroup()
 {
-    qDebug("Ut_SatAppEngine::cleanupTestCase >");
-    if ( mCpPlugin ) {
-        delete mCpPlugin;
-    qDebug("Ut_SatAppEngine::cleanupTestCase <");
-    }
+    CpItemDataHelper itemDataHelper;
+    VmbxCpGroup *group = new VmbxCpGroup(itemDataHelper);
+    QVERIFY(group);
+    delete group;
+    group = NULL;
+    
+    group = new VmbxCpGroup();
+    QVERIFY(group);
+    delete group;
+    group = NULL;
 }
-
-/*!
-    Ut_vmbxCpPlugin::t_createSettingFormItemData
-    testServiceId test case
-    Connects to test object signal and verifies received data.
-*/
-void Ut_vmbxCpPlugin::testCreateSettingFormItemData()
-{
-    qDebug("Ut_vmbxCpPlugin::testCreateSettingFormItemData >");
-    CpItemDataHelper itemDataHelper;
-    QVERIFY(mCpPlugin);
-    QList<CpSettingFormItemData *> list;
-    list = mCpPlugin->createSettingFormItemData(itemDataHelper);
-    QVERIFY2(0 != list[0], "createSettingFormItemData failed");
-    qDebug("Ut_vmbxCpPlugin::testCreateSettingFormItemData <");
-}
-
 //End of file
--- a/vmbx/vmbxcpplugin/tsrc/src/ut_vmbxuiengine.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/tsrc/src/ut_vmbxuiengine.cpp	Fri May 14 16:24:46 2010 +0300
@@ -17,27 +17,18 @@
 
 // System includes
 #include <QtTest/QtTest>
+#include <cvoicemailboxentry.h>
 
 // User includes
 #include "vmbxuiengine.h"
 #include "ut_vmbxuiengine.h"
 
-/*!
-    Ut_VmbxUiEngine::Ut_VmbxUiEngine
-    Default constructor, remember to null new members here.
-*/
-Ut_VmbxUiEngine::Ut_VmbxUiEngine()
+void setTestEnv(TInt aExpRet)
 {
-    qDebug("Ut_VmbxUiEngine <>");
+    globalExpRet = aExpRet;
+    qDebug("setTestEnv %d", globalExpRet);
 }
 
-/*!
-    Ut_VmbxUiEngine::~Ut_VmbxUiEngine
-*/
-Ut_VmbxUiEngine::~Ut_VmbxUiEngine()
-{
-    qDebug("~Ut_VmbxUiEngine <>");
-}
 
 /*!
     Ut_VmbxUiEngine::initTestCase
@@ -45,10 +36,8 @@
 */
 void Ut_VmbxUiEngine::initTestCase()
 {
-    qDebug("initTestCase >");
     mUiEngine = new VmbxUiEngine();
     QVERIFY(mUiEngine);
-    qDebug("initTestCase <");
 }
 
 /*!
@@ -57,12 +46,10 @@
 */
 void Ut_VmbxUiEngine::cleanupTestCase()
 {
-    qDebug("cleanupTestCase >");
     if ( mUiEngine ) {
         delete mUiEngine;
         mUiEngine = NULL;
     }
-    qDebug("cleanupTestCase <");
 }
 
 /*!
@@ -70,27 +57,20 @@
     testCreateVmbxEntry test case
     Connects to test object signal and verifies received data.
 */
-void Ut_VmbxUiEngine::testGetCsVoice1Number()
+void Ut_VmbxUiEngine::testCsVoice1Number()
 {
-    qDebug("testGetCsVoice1Number >");
-    QString voice1;
     QVERIFY(mUiEngine);
-    mUiEngine->getCsVoice1Number(voice1);
-    qDebug("testGetCsVoice1Number <");
-}
-
-/*!
-    Ut_VmbxUiEngine::testCreateVmbxMailbox
-    CreateVmbxMailbox test case
-    Connects to test object signal and verifies received data.
-*/
-void Ut_VmbxUiEngine::testGetCsVoice2Number()
-{
-    qDebug("testGetCsVoice2Number >");
-    QString voice2;
-    QVERIFY(mUiEngine);
-    mUiEngine->getCsVoice2Number(voice2);
-    qDebug("testGetCsVoice2Number <");
+    QString in("123456");
+    QString out("");
+    setTestEnv(KErrNone);
+    mUiEngine->setCsVoice1Number(in);
+    mUiEngine->getCsVoice1Number(out);
+    QCOMPARE(in, out);
+    
+    setTestEnv(KErrNotFound);
+    mUiEngine->setCsVoice1Number(in);
+    mUiEngine->getCsVoice1Number(out);
+    QCOMPARE(in, out);
 }
 
 /*!
@@ -98,28 +78,37 @@
     testVmbxType test case
     Connects to test object signal and verifies received data.
 */
-void Ut_VmbxUiEngine::testGetCsVideo1Number()
+void Ut_VmbxUiEngine::testCsVideo1Number()
 {
-    qDebug("testGetCsVideo1Number >");
-    QString video1;
     QVERIFY(mUiEngine);
-    mUiEngine->getCsVideo1Number(video1);
+    
+    QString in("123456");
+    QString out("");
 
-    qDebug("testGetCsVideo1Number <");
+    setTestEnv(KErrNone);
+    mUiEngine->setCsVideo1Number(in);
+    mUiEngine->getCsVideo1Number(out);
+    QCOMPARE(in, out);
+    
+    setTestEnv(KErrNotFound);
+    mUiEngine->setCsVideo1Number(in);
+    mUiEngine->getCsVideo1Number(out);
+    QCOMPARE(in, out);
 }
 
-/*!
-    Ut_VmbxUiEngine::testUiCsVoice1Changed
-    testServiceId test case
-    Connects to test object signal and verifies received data.
-*/
-void Ut_VmbxUiEngine::testUiCsVoice1Changed()
+void Ut_VmbxUiEngine::testIsVideoSupport()
 {
-    qDebug("testUiCsVoice1Changed >");
     QVERIFY(mUiEngine);
-    QString newNumber("123456");
-    mUiEngine->uiCsVoice1Changed(newNumber);
-    qDebug("testUiCsVoice1Changed <");
+    mUiEngine->isVideoSupport();
 }
 
+void Ut_VmbxUiEngine::testHandleNotifyL()
+{
+    QVERIFY(mUiEngine);
+    CVoiceMailboxEntry *entry = CVoiceMailboxEntry::NewL();
+    QVERIFY(entry);
+    mUiEngine->HandleNotifyL(*entry);
+}
+
+
 //End file
--- a/vmbx/vmbxcpplugin/tsrc/ut_vmbxcpplugin.pro	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/tsrc/ut_vmbxcpplugin.pro	Fri May 14 16:24:46 2010 +0300
@@ -15,7 +15,7 @@
 #
 
 TEMPLATE = app
-TARGET = 
+TARGET = ut_vmbxcpplugin
 DEPENDPATH += .
 INCLUDEPATH += .
 CONFIG += hb
@@ -39,7 +39,9 @@
            inc\ut_vmbxcpplugin.h \
            ..\inc\vmbxuiengine.h \
            ..\inc\vmbxcpplugin.h \
-           ..\inc\vmbxcpgroup.h
+           ..\inc\vmbxcpgroup.h \
+           ..\inc\actioncustomitem.h \
+           ..\inc\customedit.h
 
 
 SOURCES += src\main.cpp\
@@ -49,5 +51,7 @@
            src\ut_dummyvoicemailboxentry.cpp\
            ..\src\vmbxuiengine.cpp \
            ..\src\vmbxcpplugin.cpp \
-           ..\src\vmbxcpgroup.cpp 
+           ..\src\vmbxcpgroup.cpp  \
+           ..\src\actioncustomitem.cpp \
+           ..\src\customedit.cpp
 
--- a/vmbx/vmbxcpplugin/vmbxcpplugin.pri	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxcpplugin/vmbxcpplugin.pri	Fri May 14 16:24:46 2010 +0300
@@ -67,4 +67,5 @@
 
 SOURCES += src/vmbxcpplugin.cpp \
            src/vmbxcpgroup.cpp \
-           src/vmbxuiengine.cpp
\ No newline at end of file
+           src/vmbxuiengine.cpp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin_version_history.txt	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,62 @@
+
+22-Oct-2009 Tommi Kenakkala
+
+HOW TO INTEGRATE:
+- This version uses MCLwk32+QtOrbitDeltawk37+QtControlPanelwk38
+- To get this working you have use the refactored vmbxengine.
+Copy cvoicemailbox.h, cvoicemailboxentry.h, voicemailboxdefs.h to the phonesrv_plat api folder (Same as old)
+(I'll also remove vmbxengine app layer api dependencies from mercurial)
+- Copy Qt control panel to root 
+- Edit \qtcontrolpanel\qtcontrolpanel\controlpanelplugins\communicationplugin\data\cpcommunicationplugin.cpcfg
+by adding:
+  <plugin displayname = "displayname" id = "0X20029F5D"  dll = "vmbxcpplugin.dll">
+    <desc>I'm a description</desc>
+  </plugin>
+(remember to check that uid matches to implementation)
+- To get signals from ui control in QtControlPanelwk38 package you have to fix the mistyped connect
+in qtcontrolpanel\qtcontrolpanel\cpframework\src\cpsettingformitemdata.cpp:
+"lineEditTextChanged" is mistyped as "lineEditTextChangge"
+Signal is emitted on every character change so we or control panel have to fix that.
+- After above is done compile qtcontrolpanel:
+           qmake -spec symbian-abld
+           bldmake bldfiles
+           abld build winscw udeb
+- Copy vmbxcpplugin to root and compile similarly
+
+- If you want to avoid carbide:
+ - Install DebugView (debug traces are printed there)
+ - launch epoc.exe from shell, launch DebugView PC app
+ - In emulator open eshell and launch the application there by typing the exe name
+
+- If vmbxcpplugin is not loaded enable QtControlPanel tracing and check the control 
+panel fw traces, there should be a trace for every plugin load attemp. 
+After "desc" tag there's a "loading failed" string if e.g. vmbxcpplugin.dll 
+loading failed because linking to vmbxengine.dll had problems.
+Here is an ok trace from qtcontrolpanel:  
+    "[1876]  diplayname =  "displayname"  
+    [1876]  dll =  "vmbxcpplugin.dll"  
+    [1876]  desc =  "I'm a description"  " 
+
+HOW TO USE QT CONTROL PANEL ON UI: 
+- launch by selecting applications > qtcontrolpanel 
+or applications > eshell and type qtcontrolpanel
+- Click the "+" to open communications group
+- Click the "+" to open vmbx group
+- when you start editing the number, it will be save every time you change even a single character
+
+ABOUT DESIGN & FEATURES:
+
+- TODO: update VmbxCpGroup to class VmbxCpGroup : public CpSettingFormItemData 
+when DataForm bug is fixed (QTControlPanel wk39-41?), now append/addchild() panics.
+After the base class switch API will change but it should be just a few minutes of work to do that.
+
+- Ps Services to be implemented later when we know if they will be in vmbx control panel group or in service settings group.
+- UI editing permit checking must be implemented
+- Video ALS support not to be implemented on UI, do it later if there really is someone using it.
+- Default mailbox setting to be implemented later to CVoiceMailbox API and to UI, if future UI concepts still specify it.
+- Use QT_TRAP_THROWING when qt 4.6 available, but do test then that qt throws and symbian leaves work ok together.
+- Triple-check cleanup everywhere
+- .pro file include paths are hard-coded, fix those for phonesrv_plat api folders.
+
+test
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/dialogwaiter.h	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: dialog waiter
+*
+*
+*/
+
+#ifndef DIALOGWAITER_H
+#define DIALOGWAITER_H
+
+// INCLUDES
+#include <QObject>
+#include <QEventLoop>
+
+// FORWARD DECLARATION
+class HbAction;
+
+/**
+ * This utility synchronises access to dialogs, popups, menus and
+ * other ORBIT resources. How to use:
+ * <code>
+ * HbDialog* dialog = new HbDialog();
+ * DialogWaiter waiter();
+ * dialog->open(&waiter, SLOT(done(HbAction*)));
+ * HbAction* result = waiter.wait();
+ * delete dialog;
+ * if (result==...) ...
+ * </code>
+ */
+class DialogWaiter : public QObject
+{
+    Q_OBJECT
+
+    public:
+    
+        /**
+         * waits until dialog exits
+         * returns dialog exit action
+         */
+        HbAction* wait();
+
+    private slots:
+        void done(HbAction* result);
+
+    private:
+        QEventLoop mLoop;
+        HbAction* mResult;
+
+};
+
+#endif  // DIALOGWAITER_H
--- a/vmbx/vmbxengine/inc/mvmbxcenrephandler.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/mvmbxcenrephandler.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -42,7 +42,6 @@
     /**
      * Get mailbox number from CenRep
      *
-     * @since S60 v5.2
      * @param in&out aEntry the voice mailbox information data type
      * @return Symbian OS error code (KErrNone if successful)
      */
@@ -51,7 +50,6 @@
     /**
      * Saves the mailbox number
      *
-     * @since S60 v5.2
      * @param in aEntry vmbx number data to save
      * @return Symbian OS error code (KErrNone if successful)
      */
@@ -60,7 +58,6 @@
     /**
      * Fetches active store type
      *
-     * @since S60 v5.2
      * @return aStoreType Active store in use
      */
     virtual TVmbxMemoryLocation StoreType() = 0;
@@ -68,7 +65,6 @@
     /**
      * Returns state of the video support
      *
-     * @since S60 v5.2
      * @return ETrue if supported
      */
     virtual TBool VideoSupported() = 0;
@@ -76,7 +72,6 @@
     /**
      * Returns ETrue if CenRep setting Sim read only
      *
-     * @since S60 v5.2
      * @return ETrue if Sim read only
      */
     virtual TBool IsSimReadOnly() = 0;
@@ -84,7 +79,6 @@
      /**
      * Returns ETrue if number allowed to user change
      *
-     * @since S60 v5.2
      * @return ETrue if from Sim
      */
     virtual TBool IsAllowedUserEdit() = 0;
--- a/vmbx/vmbxengine/inc/mvmbxcenrepobserver.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/mvmbxcenrepobserver.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -28,7 +28,6 @@
 /**
  *  MVmbxCenRepObserver
  *
- *  @since S60 v5.2
  *  @lib vmbxengine.lib
  *
  */
@@ -39,7 +38,6 @@
     /**
     * Does the action user wants when the CenRep value has been changed.
     * 
-    * @since S60 v5.2
     * @param aId id related with the key of CenRep
     **/
     virtual void HandleCenRepChange( TVmbxCenRepKey aId ) = 0;
--- a/vmbx/vmbxengine/inc/mvmbxchangeobserver.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/mvmbxchangeobserver.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -32,7 +32,6 @@
 *
 *  @lib vmbxengine.lib
 *
-*  @since S60 v5.2
 *
 **/
 NONSHARABLE_CLASS ( MVmbxChangeObserver )
@@ -44,7 +43,6 @@
     * Observer callback function which is called when
     *sat refresh
     *
-    * @since S60 5.2
     **/
     virtual void SatRefreshL() = 0;
 
@@ -53,7 +51,6 @@
     *CenRep Key value changed
     *
     * @param aId id related with the key of CenRep
-    * @since S60 5.2
     **/
     virtual void CenRepChangedL( TVmbxCenRepKey aId ) = 0;
 
@@ -61,7 +58,6 @@
     * Observer callback function which is called when
     *sim store changed
     *
-    * @since S60 5.2
     **/
     virtual void SimStoreChangedL() = 0;
     };
--- a/vmbx/vmbxengine/inc/mvmbxresourceprovider.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/mvmbxresourceprovider.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -29,7 +29,6 @@
 /**
  *  Resource provider
  *
- *  @since S60 v5.2
  *  @lib vmbxengine.lib
  *
  */
@@ -40,7 +39,6 @@
    /**
     * Gets handler of MVmbxUiUtilities
     * 
-    * @since S60 v5.2
     * @return handler of MVmbxUiUtilities
     **/
     virtual MVmbxUiUtilities& VmbxUiUtilities() = 0;
@@ -48,7 +46,6 @@
    /**
     * Gets handler of MVmbxCenrepHandler
     * 
-    * @since S60 v5.2
     * @return handler of MVmbxCenrepHandler
     **/
     virtual MVmbxCenrepHandler& VmbxCenRepHandler() = 0;
--- a/vmbx/vmbxengine/inc/mvmbxsatrefreshobserver.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/mvmbxsatrefreshobserver.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -38,7 +38,6 @@
     /**
     * Does the action user wants when the sim file is refreshed.
     * 
-    *  @since S60 v5.2
     * @param 
     **/
     virtual void HandleSatRefresh() = 0;
--- a/vmbx/vmbxengine/inc/mvmbxservicenotify.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/mvmbxservicenotify.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -30,7 +30,6 @@
 /**
  *  MServiceNotifyHandler
  *
- *  @since S60 v5.2
  *  @lib vmbxengine.lib
  *
  */
@@ -43,4 +42,4 @@
       virtual void HandleServiceNotifyL() = 0;
     };
 
-#endif // M_VMBXSERVICENOTIFY_H
\ No newline at end of file
+#endif // M_VMBXSERVICENOTIFY_H
--- a/vmbx/vmbxengine/inc/mvmbxsimstoreobserver.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/mvmbxsimstoreobserver.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -27,7 +27,6 @@
 /**
  *  Notifier for sim store file entry changes
  *
- *  @since S60 v5.2
  *  @lib vmbxengine.lib
  *
  */
@@ -38,7 +37,6 @@
     /**
     * Does the user wants when the sim store file entry has been changed.
     * 
-    *  @since S60 v5.2
     **/
     virtual void HandleSimStoreChanged() = 0;
 
--- a/vmbx/vmbxengine/inc/mvmbxuihandler.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/mvmbxuihandler.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -30,7 +30,6 @@
 /**
  *  MVmbxUiHandler
  *
- *  @since S60 v5.2
  *  @lib vmbxengine.lib
  *
  */
@@ -42,20 +41,17 @@
     /**
      * Show mailbox query dialog
      *
-     * @since S60 v5.2
      * @param aType in TVmbxType type
-     * @param aMode Tin VmbxQueryMode mode
      * @param aNumber the voice mailbox number
      * @param aResult out the result of dialog
      */
     virtual void ShowVmbxQueryDialog( const TVmbxType& aType,
-        const TVmbxQueryMode & aMode, TDes& aNumber, TInt& aResult )= 0;
+        TDes& aNumber, TInt& aResult )= 0;
 
 
     /**
      * Show define number in selection dialog
      *
-     * @since S60 v5.2
      * @param in aType vmbx type
      * @param out aResult the result of dialog
      */
@@ -64,61 +60,23 @@
 
     /**
      * Show call number in selection dialog
+     * Leave if aArray < 1
      *
-     * @since S60 v5.2
      * @param in aArray array of the defined voice mailbox entry
-     * @param in aIcons icons of the defined voice mailbox
      * @param out aParams the type TVoiceMailboxParams which should include
      *          the service id and the type of seclected TVmbxType
      * @param out aResult the result user seclected
      */
-    /*virtual void ShowCallSelectionDialogL(
+    virtual void ShowCallSelectionDialogL(
                 const RPointerArray<CVoiceMailboxEntry>& aArray,
-                //CArrayPtr<CGulIcon>* aIcons,
-                TVoiceMailboxParams& aParams, TInt& aResult ) = 0;*/
-
-    /**
-     * Show confirmation dialog when save number to phone
-     *
-     * @since S60 v5.2
-     */
-    virtual void ShowSaveToPhoneNote() = 0;
-
-    /**
-     * Show confirmation dialog when save number to SIM
-     *
-     * @since S60 v5.2
-     */
-    virtual void ShowSaveToSimNote() = 0;
-
-    /**
-     * Show confirmation dialog when save video number
-     *
-     * @since S60 v5.2
-     */
-    virtual void ShowVideoSavedNote() = 0;
+                TVoiceMailboxParams& aParams, TInt& aResult ) = 0;
 
     /**
      * show an error dialog for invalid number
      *
-     * @since S60 v5.2
      */
-    virtual void ShowInvalidNumberNote() = 0;
+    virtual void ShowInvalidWarningNoteL() = 0;
 
-    /**
-     * show an error dialog for invalid number
-     *
-     * @since S60 v5.2
-     */
-    virtual void ShowInvalidWarningNote() = 0;
-
-    /**
-     * Show save empty information note
-     *
-     * @since S60 v5.2
-     * @param aType TVmbxType type
-     */
-     virtual void ShowSaveEmptyNote( const TVmbxType& aType ) = 0;
     };
 
 #endif // M_MVMBXUIHANDLER_H
--- a/vmbx/vmbxengine/inc/mvmbxuiutilities.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/mvmbxuiutilities.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -22,13 +22,13 @@
 
 // INCLUDES
 #include <cvoicemailbox.h>
+#include "voicemailboxdefsinternal.h"
 
 // CLASS DECLARATION
 
 /**
  *  MVmbxUiUtilities
  *
- *  @since S60 v5.2
  *  @lib vmbxengine.lib
  *
  */
@@ -39,7 +39,6 @@
     /**
      * Show mailbox query
      *
-     * @since S60 v5.2
      * @param in aType TVmbxType type
      * @param in aMode TVmbxQueryMode mode
      * @param out aNumber the voice mailbox number
@@ -52,7 +51,6 @@
      * Show mailbox query dialog
      * Leaves if user cancel selected.
      *
-     * @since S60 v5.2
      * @param aType in TVmbxType type
      * @param aMode Tin VmbxQueryMode mode
      * @param aNumber the voice mailbox number
@@ -62,41 +60,25 @@
         const TVmbxQueryMode & aMode, TDes& aNumber, TInt& aResult ) = 0;
 
     /**
-     * Show confirmation dialog when save number to phone
-     *
-     * @since S60 v5.2
-     */
-    virtual void ShowSaveToPhoneNote() = 0;
-
-    /**
-     * Show confirmation dialog when save number to SIM
+     * Show informationd note
      *
-     * @since S60 v5.2
+     * @param aType in TVmbxNoteType type
      */
-    virtual void ShowSaveToSimNote() = 0;
+    virtual void ShowInformationdNoteL(const TVmbxNoteType aType) = 0;
 
-    /**
-     * Show confirmation dialog when save video number
-     *
-     * @since S60 v5.2
-     */
-    virtual void ShowVideoSavedNote() = 0;
 
     /**
      * Show define number in selection dialog
-     * Leaves if user cancel selected.
      *
-     * @since S60 v5.2
      * @param in aType vmbx type
      * @param out aResult the result of dialog
      */
-    virtual void ShowDefineSelectionDialogL( TVmbxType& aType, TInt& aResult ) = 0;
+    virtual void ShowDefineSelectionDialog( TVmbxType& aType, TInt& aResult ) = 0;
 
     /**
      * Show call number in selection dialog
      * Leaves if user cancel selected.
      *
-     * @since S60 v5.2
      * @param in aArray array of the defined voice mailbox entry
      * @param in aIcons icons of the defined voice mailbox
      * @param out aParams the type TVoiceMailboxParams which should include
@@ -105,46 +87,33 @@
      */
     virtual void ShowCallSelectionDialogL( 
                 const RPointerArray<CVoiceMailboxEntry>& aArray, 
-               // CArrayPtr<CGulIcon>* aIcons,
                     TVoiceMailboxParams& aParams, TInt& aResult ) = 0;
 
     /**
      * Tries to close all open dialogs
      *
-     * @since S60 v5.2
      */
     virtual void DismissDialogL() = 0;
 
-    /**
-     * To get mailbox entry value
-     * Leaves with Symbian OS error code
-     *
-     * @since S60 v5.2
-     * @param aType TVmbxType type
-     */
-    virtual void ShowSaveEmptyNoteL( const TVmbxType& aType ) = 0;
 
     /**
      * Get Mailbox type default image.
      * If get unseccessful, Leaves with Symbian OS error code
      * 
-     * @since S60 v5.2
      * @param aParams Mailbox type for which image is needed.
      * @return aImage New image. Ownership is transferred.
      */
     //virtual CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams ) = 0;
 
     /**
-     * Show error dialog
+     * Show not allowed editing dialog
      *
-     * @since S60 v5.2
      */
-    virtual void ShowErrorDialogL() = 0;
+    virtual void ShowNotAllowedEditingDialogL() = 0;
 
     /**
      * Show Invalid Warning dialog.
      *
-     * @since S60 v5.2
      */
     virtual void ShowInvalidWarningDialogL() = 0;
     };
--- a/vmbx/vmbxengine/inc/vmbshandler.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbshandler.h	Fri May 14 16:24:46 2010 +0300
@@ -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,7 +31,6 @@
 /**
  *  CVmBSHandler declaration.
  *
- *  @since S60 3.2
  */
 NONSHARABLE_CLASS( CVmBSHandler ) : public CBase
     {
@@ -57,7 +56,6 @@
 
     /**
      * Get branded icon
-     * @since S60 3.2
      * @param aBrandingId Brandind Id
      * @param aBrandedBitmap Bitmap for branded icon
      * @param aBrandedBitmapMask Mask to branded icon
--- a/vmbx/vmbxengine/inc/vmbxcenrephandler.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxcenrephandler.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -36,7 +36,6 @@
 *  Creates connection to central repository and handles data flow from/to it
 *
 *  @lib vmbxengine.lib
-*  @since S60 v5.2
 */
 NONSHARABLE_CLASS( CVmbxCenRepHandler ) : public CBase,
                                           public MVmbxCenrepHandler
@@ -58,7 +57,6 @@
     /**
      * Get saved mailbox number
      *
-     * @since S60 v5.2
      * @param aEntry saved vmbx number data
      * @return Symbian OS error code (KErrNone if successful)
      */
@@ -67,7 +65,6 @@
     /**
      * Saves the mailbox number
      *
-     * @since S60 v5.2
      * @param aEntry vmbx number data to save
      * @return Symbian OS error code (KErrNone if successful)
      */
@@ -76,7 +73,6 @@
     /**
      * Fetches active store type
      *
-     * @since S60 v5.2
      * @return aStoreType Active store in use
      */
     TVmbxMemoryLocation StoreType();
@@ -84,7 +80,6 @@
     /**
      * Returns state of the video support
      *
-     * @since S60 v5.2
      * @return ETrue if supported
      */
     TBool VideoSupported();
@@ -92,7 +87,6 @@
     /**
      * Returns ETrue if CenRep setting Sim read only
      *
-     * @since S60 v5.2
      * @return ETrue if CenRep setting Sim read only
      */
     TBool IsSimReadOnly();
@@ -100,7 +94,6 @@
      /**
      * Returns ETrue if number allowed to user change
      *
-     * @since S60 v5.2
      * @return ETrue if from Sim
      */
     TBool IsAllowedUserEdit();
@@ -121,7 +114,6 @@
     /**
      * Resolves Voice CenRep key to be used
      *
-     * @since S60 v5.2
      * @param in aLine current ALS lne
      * @return CenRep key
      */
@@ -130,7 +122,6 @@
     /**
      * Resolves Video CenRep key to be used
      *
-     * @since S60 v5.2
      * @param in aLine current ALS lne
      * @return CenRep key
      */
@@ -139,7 +130,6 @@
    /**
      * Resolves CenRep key to be used
      *
-     * @since S60 v5.2
      * @param aEntry entry type
      * @return CenRep key
      */
--- a/vmbx/vmbxengine/inc/vmbxcenrepobserver.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxcenrepobserver.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -35,7 +35,6 @@
 /**
  *  CVmbxCenRepObserver declaration.
  *
- *  @since S60 5.2
  */
 NONSHARABLE_CLASS( CVmbxCenRepObserver ) : public CBase,
                                            public MCenRepNotifyHandlerCallback
@@ -45,7 +44,6 @@
 
     /**
     * Two-phased constructor.
-     * @since S60 v5.2
      * @param in aObserver observer notify the CenRep changed.
      * @return New instance of the object. Ownership transferred.
     */
@@ -53,7 +51,6 @@
 
     /**
      * Two-phased constructor.
-     * @since S60 v5.2
      * @param in aObserver observer notify the CenRep changed.
      * @return New instance of the object. Ownership transferred.
      */
@@ -76,7 +73,6 @@
 
     /**
      * C++ default constructor.
-     * @since S60 v5.2
      * @param in aObserver observer notify the CenRep changed.
      */
     CVmbxCenRepObserver( MVmbxCenRepObserver& aObserver );
--- a/vmbx/vmbxengine/inc/vmbxcsvideoengine.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxcsvideoengine.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -32,7 +32,6 @@
 *  Implements functionality specifig to video mailbox implementation
 *
 *  @lib vmbxengine.lib
-*  @since S60 v5.2
 */
 NONSHARABLE_CLASS( CVmbxCsVideoEngine ) : public CVmbxEngineBase
     {
@@ -56,7 +55,6 @@
     /**
      * @see CVmbxEntryBase::GetL
      *
-     * @since S60 v5.2
      * @param in aEntry a pointer reference of CVoiceMailboxEntry
      */
     void GetL( CVoiceMailboxEntry*& aEntry );
@@ -64,7 +62,6 @@
     /**
      * @see CVmbxEntryBase::SaveL
      *
-     * @since S60 v5.2
      * @param aEntry Reference to CVoiceMailboxEntry
      */
     void SaveL( const CVoiceMailboxEntry& aEntry );
@@ -72,17 +69,28 @@
     /**
      * To save mailbox Provisioned entry value
      *
-     * @since S60 v5.2
      * @param in aEntry Reference to CVoiceMailboxEntry
      */
     void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry );
+    
+    /**
+     * @see CVoiceMailbox::CheckConfiguration
+     *
+     * @param aParams Specifies which mailbox capabilities,
+     *          the caller wants to check.
+     * @param aFlags Use TVmbxFeatureCapabilityFlag values for this parameter.
+     *          Specifies what features client wants to check.
+
+     * @return True if feature(s) enabled.
+     */
+    TBool CheckConfiguration( const TVoiceMailboxParams& aParams,
+                                 const TInt aFlags );
 
 private:
 
     /**
      * C++ default constructor.
      *
-     * @since S60 v5.2
      * @param in aProvider Reference to Ui Utilities
      */
     CVmbxCsVideoEngine( MVmbxResourceProvider& aProvider );
@@ -90,7 +98,6 @@
     /**
      * By default Symbian 2nd phase constructor is private.
      *
-     * @since S60 v5.2
      */
     void ConstructL();
 
--- a/vmbx/vmbxengine/inc/vmbxcsvoiceengine.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxcsvoiceengine.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -32,7 +32,6 @@
 *  Implements functionality specifig to voice mailbox entry
 *
 *  @lib vmbxengine.lib
-*  @since S60 v5.2
 */
 NONSHARABLE_CLASS( CVmbxCsVoiceEngine ) : public CVmbxEngineBase
     {
@@ -41,7 +40,6 @@
 
     /**
      * Two-phased constructor
-     * @since S60 v5.2
      * @param aProvider Reference to MVmbxResourceProvider.
      * @return New instance of the object. Ownership transferred.
      */
@@ -57,7 +55,6 @@
     /**
      * @see CVmbxEntryBase::GetL
      *
-     * @since S60 v5.2
      * @param aEntry Reference to CVoiceMailboxEntry
      */
     void GetL( CVoiceMailboxEntry*& aEntry );
@@ -65,7 +62,6 @@
     /**
      * @see CVmbxEntryBase::SaveL
      *
-     * @since S60 v5.2
      * @param aEntry 
      */
     void SaveL( const CVoiceMailboxEntry& aEntry );
@@ -73,7 +69,6 @@
     /**
      * To save mailbox Provisioned entry value
      *
-     * @since S60 v5.2
      * @param aEntry Provisioned Entry data
      */
     void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry );
@@ -81,7 +76,6 @@
     /**
      * @see CVoiceMailbox::CheckConfiguration
      *
-     * @since S60 v5.2
      * @param aParams Specifies which mailbox capabilities,
      *          the caller wants to check.
      * @param aFlags Use TVmbxFeatureCapabilityFlag values for this parameter.
@@ -95,7 +89,6 @@
     /**
      * Check Entry writable
      *
-     * @since S60 v5.2
      * @param aParams params of Entry data
      * @return ETrue if entry is writable
      */
@@ -106,7 +99,6 @@
     /**
      * C++ default constructor.
      *
-     * @since S60 v5.2
      * @param aProvider Reference to MVmbxResourceProvider
      */
     CVmbxCsVoiceEngine( MVmbxResourceProvider& aProvider );
@@ -114,14 +106,12 @@
     /**
      * By default Symbian 2nd phase constructor is private.
      *
-     * @since S60 v5.2
      */
     void ConstructL();
 
     /**
      * Queries where to save and then saves
      *
-     * @since S60 v5.2
      * @param in aEntry Entry data
      */
     void SaveEntryToPhoneL( const CVoiceMailboxEntry& aEntry );
@@ -129,7 +119,6 @@
     /**
      * For saving to place that user selects
      *
-     * @since S60 v5.2
      * @param in aEntry Entry data
      */
     void SaveEntryToSimL( const CVoiceMailboxEntry& aEntry );
@@ -137,7 +126,6 @@
     /**
      * Returns Sim writable or not
      *
-     * @since S60 v5.2
      * @return ETrue if writable
      */
     TBool IsSimWritable();
--- a/vmbx/vmbxengine/inc/vmbxemergencycall.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxemergencycall.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -31,7 +31,6 @@
 *  CVmbxEmergencyCall declaration
 *
 *  @lib vmbxengine.lib
-*  @since S60 v5.2
 */
 NONSHARABLE_CLASS( CVmbxEmergencyCall ) : public CBase,
                         public MPhCltEmergencyCallObserver
@@ -40,20 +39,17 @@
 
     /**
      * Two-phased constructor
-     * @since S60 v5.2
      */
     static CVmbxEmergencyCall* NewL();
     
     /**
      * Destructor.
-     * @since S60 v5.2
      */
     ~CVmbxEmergencyCall();
 
     /**
      * Verifies that the given number is not an emergency number.
      *
-     * @since S60 v5.2
      * @param aNumber Mailbox number
      * @return ETrue if emergency number
      */
@@ -64,13 +60,11 @@
     /**
      * C++ default constructor.
      *
-     * @since S60 v5.2
      */
     CVmbxEmergencyCall();
 
     /**
      * C++  Two-phased constructor.
-     * @since S60 v5.2
      */
     void ConstructL();
 
@@ -81,7 +75,6 @@
      *
      * @see MPhCltExtPhoneObserver::HandleDialL().
      *
-     * @since S60 v5.2
      * @param aEntry Reference to store handler
      */
     void HandleDialL( const TInt aStatus );
@@ -89,7 +82,6 @@
     /**
      * Handling of emergency dial result.
      *
-     * @since S60 v5.2
      * @param aEntry Reference to store handler
      */
     void HandleEmergencyDialL( const TInt aStatus );
--- a/vmbx/vmbxengine/inc/vmbxenginebase.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxenginebase.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -33,7 +33,6 @@
 *  Implemets mailbox entry base class functionality
 *
 *  @lib vmbxengine.lib
-*  @since S60 v5.2
 */
 NONSHARABLE_CLASS( CVmbxEngineBase ) : public CBase
     {
@@ -56,7 +55,6 @@
      * To get mailbox entry value
      * Leave if no number got or Symbian OS error code
      *
-     * @since S60 v5.2
      * @param aEntry Entry data
      */
     virtual void GetL( CVoiceMailboxEntry*& aEntry ) = 0;
@@ -65,7 +63,6 @@
      * To save mailbox entry value
      * Leave with Symbian OS error code
      *
-     * @since S60 v5.2
      * @param aEntry Entry data
      */
     virtual void SaveL( const CVoiceMailboxEntry& aEntry ) = 0;
@@ -74,7 +71,6 @@
      * To save mailbox Provisioned entry value
      * Leave with Symbian OS error code
      *
-     * @since S60 v5.2
      * @param aEntry Provisioned Entry data
      */
     virtual void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry ) = 0;
@@ -83,7 +79,6 @@
      * Checks the Voice Mailbox how many VoIP service Ids
      * Leave with Symbian OS error code
      *
-     * @since S60 v5.2
      * @param aProfileIds id of voip profile
      */
     virtual void GetServiceIdsL( RIdArray& aProfileIds );
@@ -91,14 +86,12 @@
     /**
      * see CVoiceMailbox::GetVmbxImage
      * 
-     * @since S60 v5.2
      */
     //virtual CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams );
 
     /**
      * Sets the Voice Mailbox current service id.
      *
-     * @since S60 v5.2
      * @param aVmbxServiceId Voice Mailbox service id.
      */
     virtual void SetCurrentServiceId( const TServiceId& aVmbxServiceId );
@@ -107,7 +100,6 @@
      * Checks the Voice Mailbox configuration to find out if a features
      * are disabled or enabled.
      *
-     * @since S60 v5.2
      * @param aParams Specifies which mailbox capabilities,
      *          the caller wants to check.
      * @param aFlags Use TVmbxFeatureCapability values for this parameter.
@@ -122,7 +114,6 @@
      * Displays number query dialog
      * Leave if user don't select or Symbian OS error code
      *
-     * @since S60 v5.2
      * @param aEntry CVoiceMailboxEntry
      */
     virtual void QueryDefineNumberL( CVoiceMailboxEntry& aEntry );
@@ -131,7 +122,6 @@
      * Displays number query dialog
      * Leave if user don't select or Symbian OS error code
      *
-     * @since S60 v5.2
      * @param aEntry Entry data
      */
     virtual void QueryChangeNumberL( CVoiceMailboxEntry& aEntry );
--- a/vmbx/vmbxengine/inc/vmbxenginefactory.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxenginefactory.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -32,7 +32,6 @@
 *  CVmbxEngineFactory declaration
 *
 *  @lib vmbxengine.lib
-*  @since S60 v5.2
 */
 NONSHARABLE_CLASS( CVmbxEngineFactory ) : public CBase
     {
@@ -41,7 +40,6 @@
 
     /**
      * Two-phased constructor
-     * @since S60 v5.2
      * @param aProvider Reference to MVmbxResourceProvider
      */
     static CVmbxEngineFactory* NewL( MVmbxResourceProvider& aProvider );
@@ -56,7 +54,6 @@
     /**
      * Creates instance of the mailbox entry
      *
-     * @since S60 v5.2
      * @param aEngine ownership is transferred
      * @param aType mailbox type
      */
@@ -66,7 +63,6 @@
 
     /**
      * C++ default constructor.
-     * @since S60 v5.2
      * @param aProvider Reference to MVmbxResourceProvider
      */
     CVmbxEngineFactory( MVmbxResourceProvider& aProvider );
--- a/vmbx/vmbxengine/inc/vmbxetelconnection.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxetelconnection.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -34,7 +34,6 @@
 /**
 *  Creates connection to RTelServer and opens RMobilePhone
 *
-*  @since S60 v5.2
 */
 NONSHARABLE_CLASS( CVmbxETelConnection ): public CBase
     {
@@ -57,7 +56,6 @@
     /**
      * Returns a reference to the ETel RTelServer
      *
-     * @since S60 v5.2
      * @return a reference to the ETel RTelServer
      */
     RTelServer& TelServer();
@@ -65,7 +63,6 @@
     /**
      * Returns a reference to the ETel RMobilePhone
      *
-     * @since S60 v5.2
      * @return a reference to the ETel RMobilePhone
      */
     RMobilePhone& Phone();
--- a/vmbx/vmbxengine/inc/vmbxlogger.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxlogger.h	Fri May 14 16:24:46 2010 +0300
@@ -39,12 +39,12 @@
 * 2 = RDebug
 ***************************/
 
-#define VMB_LOGGING_METHOD      1   // UREL BUILD
+#define VMB_LOGGING_METHOD      0   // UREL BUILD
 
 #else
 
 #ifdef __WINS__
-#define VMB_LOGGING_METHOD      2   // UDEB BUILD, WINS
+#define VMB_LOGGING_METHOD      1   // UDEB BUILD, WINS
 #else
 #define VMB_LOGGING_METHOD      2   // UDEB BUILD, HW
 #endif // __WINS__
--- a/vmbx/vmbxengine/inc/vmbxobserver.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxobserver.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -42,7 +42,6 @@
  *  Mailbox observer
  *
  *  @lib vmbxengine.lib
- *  @since S60 v5.2
  */
 NONSHARABLE_CLASS( CVmbxObserver ) : public CBase,
                                      public MVmbxSimStoreObserver,
@@ -55,14 +54,12 @@
     /**
      * Two-phased constructor.
      * @param in aProvider Reference to MVmbxResourceProvider
-     * @since S60 v5.2
     */
     static CVmbxObserver* NewL( MVmbxResourceProvider& aProvider );
 
     /**
      * Two-phased constructor.
      * @param in aProvider Reference to MVmbxResourceProvider
-     * @since S60 v5.2
      */
     static CVmbxObserver* NewLC( MVmbxResourceProvider& aProvider );
 
@@ -76,7 +73,6 @@
     /**
      * Observe vmbx change.
      * @param in aObserver Reference to MVmbxChangeObserver
-     * @since S60 v5.2
      */
     void SetVmbxObserver( MVmbxChangeObserver& aObserver );
 
@@ -84,20 +80,17 @@
 
     /**
      * From MVmbxSimStoreObserver::HandleSimStoreChanged
-     * @since S60 v5.2
      */
     void HandleSimStoreChanged();
 
     /**
      * From MVmbxSatRefreshObserver::HandleSatRefresh
-     * @since S60 v5.2
      */
     void HandleSatRefresh();
 
     /**
      * From MVmbxCenRepObserver::HandleCenRepChange
      * @param in aId the changed key Id
-     * @since S60 v5.2
      */
     void HandleCenRepChange( TVmbxCenRepKey aId );
 
@@ -106,7 +99,6 @@
     /**
      * C++ default constructor.
      * @param in aProvider Reference to MVmbxResourceProvider
-     * @since S60 v5.2
      */
     CVmbxObserver( MVmbxResourceProvider& aProvider );
 
--- a/vmbx/vmbxengine/inc/vmbxpbkstore.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxpbkstore.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -38,7 +38,6 @@
 *  Creates connection to Sim phonebook and handles data flow from/to it
 *
 *  @lib vmbxengine.lib
-*  @since S60 v5.2
 */
 NONSHARABLE_CLASS( CVmbxPbkStore ) : public CActive
     {
@@ -60,14 +59,12 @@
     /**
      * Sim write support
      *
-     * @since S60 v5.2
      * @return ETrue if writable
      */
     TBool IsWritable();
 
     /**
      * sim PhoneBook Type
-     * @since S60 v5.2
      * @return TVmbxSimPhonebookType
      */
     TVmbxSimPhonebookType PhoneBookType();
@@ -75,7 +72,6 @@
     /**
      * Writes an entry into ICC-based phonebook.
      *
-     * @since S60 v5.2
      * @param in aEntry Reference of CVoiceMailboxEntry
      * @return KErrNone if succesful,
      *         Other system wide errors.
@@ -85,14 +81,12 @@
     /**
      * Retrieves hanlder of RMobilePhoneBookStore
      *
-     * @since S60 v5.2
      * @retuns hanlder of RMobilePhoneBookStore
      */
     RMobilePhoneBookStore& PhonebookStore();
 
     /**
     * Retrieves mailbox number from Sim
-    * @since S60 v5.2
     * @param out aEntry a data type CVoiceMailboxEntry
     */
     void GetL( CVoiceMailboxEntry& aEntry );
@@ -119,21 +113,18 @@
     /**
      * Reads an entry from the ICC-based phonebook.
      *
-     * @since S60 v5.2
      * @param out aEntry Reference of CVoiceMailboxEntry
      **/
     void SimReadL( CVoiceMailboxEntry& aEntry );
 
     /**
      * Opens VMBX phonebook
-     * @since S60 v5.2
      * @retuns KErrNone if succesful
      **/
     TInt OpenVmbxPhonebook();
 
     /**
      * Opens MBDN phonebook
-     * @since S60 v5.2
      * @retuns KErrNone if succesful
      **/
     TInt OpenMbdnPhonebook();
@@ -142,7 +133,6 @@
      * Get Phonebook Info
      * @param out aInfo information from RPhonebookStore
      *
-     * @since S60 v5.2
      **/
     TInt GetVmbxInfo( RMobilePhoneBookStore::TMobilePhoneBookInfoV1& aInfo );
 
@@ -150,7 +140,6 @@
      * Retrieves the Mailbox numbers identifier information
      * @param in aAlsLine curent als line
      * @param out aInfo information from RPhonebookStore
-     * @since S60 v5.2
      * @retuns KErrNone if succesful
      **/
     TInt GetMbdnInfo( const TVmbxAlsLineType aAlsLine,
@@ -160,7 +149,6 @@
     /**
      * Reads "ParseDataL" from phonebook data from Sim
      *
-     * @since S60 v5.2
      * @param out aEntry entry of CVoiceMailboxEntry
      * @param in aPbData
      */
@@ -169,7 +157,6 @@
     /**
      * Reads "new-entry-tag" from phonebook data from Sim
      *
-     * @since S60 v5.2
      * @param in aPbkBuffer Phonebook data buffer
      * @retuns KErrNone if succesful
      */
@@ -178,7 +165,6 @@
     /**
      * Reads tags from buffer retrieved from sim
      *
-     * @since S60 v5.2
      * @param in aPbkBuffer Phonebook data buffer
      * @param out aEntry Reference of CVoiceMailboxEntry
      */
@@ -186,19 +172,24 @@
                         CVoiceMailboxEntry& aEntry );
 
     /**
-     * Checks if sim-card is USim
+     * Checks sim file existing
      *
-     * @since S60 v5.2
-     * @return ETrue if USim
+     * @retuns ETrue if file exists
      **/
-    TBool SimFileExistsAndReadAccess();
+    TBool IsSimFileExisting( const TVmbxSimPhonebookType aType );
+
+    /**
+     * Sim write acces support
+     *
+     * @return ETrue if writable access
+     */
+    TBool IsWriteAccess();
 
 protected:
 
     /**
      * C++ constructor.
      *
-     * @since S60 v5.2
      */
     CVmbxPbkStore();
 
--- a/vmbx/vmbxengine/inc/vmbxqtuihandler.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxqtuihandler.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -22,74 +22,108 @@
 
 // INCLUDES
 #include <QObject>
+#include <QTranslator>
 #include <voicemailboxdefs.h>
 
+#include "voicemailboxdefsinternal.h"
+
 // FORWARD DECLARATION
+class CVoiceMailboxEntry;
+class TVoiceMailboxParams;
+class HbInputDialog;
 
- 
 // CLASS DECLARATION
 
 /**
 *  Dialog manager
 *
 *  @lib vmbxengine.lib
-*  @since  S60 v5.2
 */
-NONSHARABLE_CLASS( VmbxQtUiHandler ): public QObject
+class VmbxQtUiHandler : public QObject
     {
-
+    Q_OBJECT
+    
 public: // Constructors and destructor
 
     /**
     * C++ default constructor.
     *
-    * @since S60 v5.2
     */
     VmbxQtUiHandler(QObject* parent = 0 );
 
     /**
     * Destructor.
     */
-     ~VmbxQtUiHandler();
+    virtual ~VmbxQtUiHandler();
+
+     /**
+     * Initialize, load qt translator.
+     */
+     void  init();
 
     /**
     * Show mailbox query dialog
     *
-    * @since S60 v5.2
     * @param aType in TVmbxType type
-    * @param aMode Tin VmbxQueryMode mode
     * @param aNumber the voice mailbox number
     * @param aResult out the result of dialog
     */
     void showVmbxQueryDialog(const TVmbxType& aType,
-                                const TVmbxQueryMode& aMode,
-                                QString& aNumber, int& aResult);
+                             QString& aNumber, int& aResult);
 
     /**
      * Show define number in selection dialog
      * Leaves if user cancel selected.
      *
-     * @since S60 v5.2
      * @param in aType vmbx type
      * @param out aResult the result of dialog
      */
     void showDefineSelectionDialog(TVmbxType& aType, int& aResult);
 
     /**
+     * Show call number in selection dialog
+     *
+     * @param in entryList array of the defined voice mailbox entry
+     * @param out params the type TVoiceMailboxParams which should include
+     *          the service id and the type of seclected TVmbxType
+     * @param out result the result user seclected
+     */
+    void showCallSelectionDialog(
+                const QList<CVoiceMailboxEntry *> entryList,
+                TVoiceMailboxParams &params, int &result );
+
+    /**
     * Show voice mailbox information number
     *
-    * @since S60 v5.2
     * @param aNoteType in TVmbxType type
     */
-    void showInformationNote(int aNoteType);
+    void showInformationNote(const TVmbxNoteType aType);
+    
+private slots:
+    /**
+    * update Ok button status according to user input string
+    *
+    * @param aInput User input string
+    */
+    void updatePrimaryAction(const QString &aInput);
+
+private:
 
     /**
-    * Show save empty number note
-    *
-    * @since S60 v5.2
-    * @param aType in TVmbxType type
+    * Translator vmbx localization
+    */
+    QTranslator iTranslator;
+
+    /**
+    * Translator common localization
     */
-    void showSaveEmptyNote(const TVmbxType& aType);
+    QTranslator iCommonTranslator;
+    
+    /**
+    * Query and Define mailbox dialog. Own
+    */    
+    HbInputDialog *iQueryDialog;
+
     };
 
 #endif  // VMBXQTUIHANDLER_H
--- a/vmbx/vmbxengine/inc/vmbxsatrefreshobserver.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxsatrefreshobserver.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -38,7 +38,6 @@
 *
 
 *  @lib vmbxengine.lib
-*  @since S60 v5.2
 */
 NONSHARABLE_CLASS( CVmbxSatRefreshObserver ) : public CBase,
                               public MSatRefreshObserver
--- a/vmbx/vmbxengine/inc/vmbxsimhandler.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxsimhandler.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -36,7 +36,6 @@
 *  Creates connection to Sim phonebook and handles data flow from/to it
 *
 *  @lib vmbxengine.lib
-*  @since S60 v5.2
 */
 NONSHARABLE_CLASS( CVmbxSimHandler ) : public CBase
     {
@@ -57,14 +56,12 @@
 
     /**
      * Retrieves mailbox number from Sim
-     * @since S60 v5.2
      * @param in aEntry a data type of CVoiceMailboxEntry
      */
     void GetL( CVoiceMailboxEntry& aEntry );
 
     /**
      * Saves vmbx number to Sim
-     * @since S60 v5.2
      * @param in aEntry a data type of CVoiceMailboxEntry
      * @return Symbian OS error code (KErrNone if successful)
      */
@@ -72,7 +69,6 @@
 
     /**
      * Returns sim write access info
-     * @since S60 v5.2
      * @return ETrue if Sim is writable
      **/
     TBool IsWritable();
@@ -80,21 +76,18 @@
     /**
      * @see RMobilePhoneStore::NotifyStoreEvent
      *
-     * @since S60 v5.2
      */
     void NotifyStoreEvent( TRequestStatus& aStatus,
                                              TUint32& aEvent,
                                              TInt& aIndex ) const;
     /**
      * Retrieves Sim PhoneBook Type
-     * @since S60 v5.2
      * @return TVmbxSimPhonebookType
      */
     TVmbxSimPhonebookType PhoneBookType();
 
     /**
      * CancelAsyncRequest
-     * @since S60 v5.2
      * @param aReqToCancel Entry data
      */
     void CancelAsyncRequest( TInt aReqToCancel ) const;
--- a/vmbx/vmbxengine/inc/vmbxsimstoreobserver.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxsimstoreobserver.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -33,7 +33,6 @@
 *  DECLARATION CVmbxSimStoreObserver
 *
 *  @lib vmbxengine.lib
-*  @since S60 v5.2
 */
 NONSHARABLE_CLASS( CVmbxSimStoreObserver ) : public CActive
     {
--- a/vmbx/vmbxengine/inc/vmbxuihandler.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxuihandler.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -31,7 +31,6 @@
 /**
 *
 *  @lib qvmbxengine.lib
-*  @since  S60 v5.2
 */
 NONSHARABLE_CLASS( CVmbxUiHandler ):public CBase,
                      public MVmbxUiHandler
@@ -40,7 +39,6 @@
 public: // Constructors and destructor
     /**
      * Two-phased constructor
-     * @since S60 v5.2
      */
     static CVmbxUiHandler* NewL();
 
@@ -55,19 +53,16 @@
      * Show mailbox query dialog
      * Leaves if user cancel selected.
      *
-     * @since S60 v5.2
      * @param aType in TVmbxType type
-     * @param aMode Tin VmbxQueryMode mode
      * @param aNumber the voice mailbox number
      * @param aResult out the result of dialog
      */
     virtual void ShowVmbxQueryDialog( const TVmbxType& aType,
-        const TVmbxQueryMode & aMode, TDes& aNumber, TInt& aResult );
+        TDes& aNumber, TInt& aResult );
 
     /**
      * Show define number in selection dialog
      *
-     * @since S60 v5.2
      * @param in aType vmbx type
      * @param out aResult the result of dialog
      */
@@ -75,74 +70,41 @@
 
     /**
      * Show call number in selection dialog
+     * Leave if aArray < 1
      *
-     * @since S60 v5.2
      * @param in aArray array of the defined voice mailbox entry
      * @param in aIcons icons of the defined voice mailbox
      * @param out aParams the type TVoiceMailboxParams which should include
      *          the service id and the type of seclected TVmbxType
      * @param out aResult the result user seclected
      */
-    /*virtual void ShowCallSelectionDialogL(
+    virtual void ShowCallSelectionDialogL(
                 const RPointerArray<CVoiceMailboxEntry>& aArray,
                 //CArrayPtr<CGulIcon>* aIcons,
-                TVoiceMailboxParams& aParams, TInt& aResult ) = 0;*/
-
-    /**
-     * Show confirmation dialog when save number to phone
-     *
-     * @since S60 v5.2
-     */
-    virtual void ShowSaveToPhoneNote();
+                TVoiceMailboxParams& aParams, TInt& aResult );
 
     /**
-     * Show confirmation dialog when save number to SIM
+     * Show informationd note
      *
-     * @since S60 v5.2
+     * @param aType in TVmbxNoteType type
      */
-    virtual void ShowSaveToSimNote();
-
-    /**
-     * Show confirmation dialog when save video number
-     *
-     * @since S60 v5.2
-     */
-    virtual void ShowVideoSavedNote();
+    virtual void ShowInformationdNoteL(const TVmbxNoteType aType);
 
     /**
      * show an error dialog for invalid number
      *
-     * @since S60 v5.2
      */
-    virtual void ShowInvalidNumberNote();
-
-    /**
-     * show an error dialog for invalid number
-     *
-     * @since S60 v5.2
-     */
-    virtual void ShowInvalidWarningNote();
-
-    /**
-     * To get mailbox entry value
-     * Leaves if Symbian OS error code
-     *
-     * @since S60 v5.2
-     * @param aType TVmbxType type
-     */
-     virtual void ShowSaveEmptyNote( const TVmbxType& aType );
+    virtual void ShowInvalidWarningNoteL();
 
 private:
 
     /** C++ default constructor.
     *
-    * @since S60 v5.2
     */
     CVmbxUiHandler();
 
     /**
      * C++  Two-phased constructor.
-     * @since S60 v5.2
      */
     void ConstructL();
 
--- a/vmbx/vmbxengine/inc/vmbxuiutilities.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxuiutilities.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -44,13 +44,11 @@
 
     /**
      * Two-phased constructor
-     * @since S60 v5.2
      */
     static CVmbxUiUtilities* NewL();
 
     /**
      * Destructor.
-     * @since S60 v5.2
      */
     ~CVmbxUiUtilities();
 
@@ -70,7 +68,6 @@
      * Show mailbox query dialog
      * Leaves if user cancel selected.
      *
-     * @since S60 v5.2
      * @param aType in TVmbxType type
      * @param aMode Tin VmbxQueryMode mode
      * @param aNumber the voice mailbox number
@@ -80,41 +77,26 @@
         const TVmbxQueryMode & aMode, TDes& aNumber, TInt& aResult );
 
     /**
-     * Show confirmation dialog when save number to phone
-     *
-     * @since S60 v5.2
-     */
-    void ShowSaveToPhoneNote();
-
-    /**
-     * Show confirmation dialog when save number to SIM
+     * Show informationd note
      *
-     * @since S60 v5.2
+     * @param aType in TVmbxNoteType type
      */
-    void ShowSaveToSimNote();
-
-    /**
-     * Show confirmation dialog when save video number
-     *
-     * @since S60 v5.2
-     */
-    void ShowVideoSavedNote();
+    void ShowInformationdNoteL(const TVmbxNoteType aType);
+ 
 
     /**
      * Show define number in selection dialog
      * Leaves if user cancel selected.
      *
-     * @since S60 v5.2
      * @param in aType vmbx type
      * @param out aResult the result of dialog
      */
-    void ShowDefineSelectionDialogL( TVmbxType& aType, TInt& aResult );
+    void ShowDefineSelectionDialog( TVmbxType& aType, TInt& aResult );
 
     /**
      * Show call number in selection dialog
      * Leaves if user cancel selected.
      *
-     * @since S60 v5.2
      * @param in aArray array of the defined voice mailbox entry
      * @param in aIcons icons of the defined voice mailbox
      * @param out aParams the type TVoiceMailboxParams which should include
@@ -129,40 +111,28 @@
     /**
      * Tries to close all open dialogs
      *
-     * @since S60 v5.2
      */
     void DismissDialogL();
 
-    /**
-     * To get mailbox entry value
-     * Leaves if Symbian OS error code
-     *
-     * @since S60 v5.2
-     * @param aType TVmbxType type
-     */
-    void ShowSaveEmptyNoteL( const TVmbxType& aType );
 
     /**
      * Get Mailbox type default image.
      * If get unseccessful, Leaves with Symbian OS error code
      *
-     * @since S60 v5.2
      * @param aParams Mailbox type for which image is needed.
      * @return aImage New image. Ownership is transferred.
      */
     //CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams );
 
     /**
-     * Show error dialog
+     * Show not allowed editing dialog
      *
-     * @since S60 v5.2
      */
-    void ShowErrorDialogL();
+    void ShowNotAllowedEditingDialogL();
 
     /**
      * Show invalid or warning dialog
      *
-     * @since S60 v5.2
      */
     void ShowInvalidWarningDialogL();
 
@@ -176,7 +146,6 @@
 
     /**
      * C++  Two-phased constructor.
-     * @since S60 v5.2
      */
     void ConstructL();
 
--- a/vmbx/vmbxengine/inc/vmbxutilities.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxutilities.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -32,7 +32,6 @@
 *  Implementation of the auxiliary methods for the VMBX engine classes
 *
 *  @lib vmbxengine.lib
-*  @since S60 v5.2
 */
 NONSHARABLE_CLASS(  VmbxUtilities )
     {
@@ -45,7 +44,6 @@
      * - '+' is only allowed as the first character
      * - The phone number part must be between 3-40 digits
      *
-     * @since S60 v5.2
      * @param in aNumber Vmbx number
      * @return ETrue if valid number
      */
@@ -55,7 +53,6 @@
     /**
      * Returns active ALS
      *
-     * @since S60 v5.2
      * @return Active ALS line
      */
     static TVmbxAlsLineType AlsLine();
@@ -63,7 +60,6 @@
     /**
      * Returns state of the video support
      *
-     * @since S60 v5.2
      * @return ETrue if Video supported
      */
     static TBool VideoSupported();
@@ -71,7 +67,6 @@
     /**
      * Returns state of the VoIP Support
      *
-     * @since S60 v5.2
      * @return ETrue if VoIP Supported
      */
     static TBool VoIPSupported();
@@ -79,7 +74,6 @@
     /**
      * Verifies that the given number is not an emergency number.
      *
-     * @since S60 v5.2
      * @param in aNumber Mailbox number
      * @return ETrue if emergency number
      */
@@ -88,18 +82,8 @@
 private:
 
     /**
-     * Verifies that the given string is a valid SS.
-     *
-     * @since S60 v5.2
-     * @param in&out aLexer string to be validate
-     * @return ETrue if supplementary service code validate
-     */
-    static TBool ValidateSsNum( TLex& aLexer );
-
-    /**
      * Verifies that the given string is a valid Tel number.
      *
-     * @since S60 v5.2
      * @param in aLexer string to be validate
      * @return ETrue if tel number validate
      */
@@ -108,7 +92,6 @@
     /**
      * Verifies that the given string is a valid DTMF number.
      *
-     * @since S60 v5.2
      * @param in aLexer string to be validate
      * @return ETrue if DTMf validate
      */
@@ -116,4 +99,4 @@
 
     };
 
-#endif  // VMBXUTILITIES_H
+#endif    // VMBXUTILITIES_H
--- a/vmbx/vmbxengine/inc/vmbxvoipengine.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/vmbxvoipengine.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -38,7 +38,6 @@
 *  Implements functionality specifig to voip mailbox entry
 *
 *  @lib vmbxengine.lib
-*  @since S60 v5.2
 */
 NONSHARABLE_CLASS( CVmbxVoIpEngine ) : public CVmbxEngineBase
     {
@@ -61,7 +60,6 @@
 
     /**
      *
-     * @since S60 v5.2
      * @see CVmbxEntryBase::GetL
      * @param aEntry Reference to store handler
      */
@@ -69,7 +67,6 @@
 
     /**
      *
-     * @since S60 v5.2
      * @see CVmbxEntryBase::SaveL
      * @param aEntry Reference to CVoiceMailboxEntry
      */
@@ -78,7 +75,6 @@
     /**
      * To save mailbox Provisioned entry value
      *
-     * @since S60 v5.2
      * @param aEntry Provisioned Entry data
      */
     void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry );
@@ -86,7 +82,6 @@
     /**
      * see CVmbxEntryBase::CheckConfiguration
      *
-     * @since S60 v5.2
      */   
     TBool CheckConfiguration( const TVoiceMailboxParams& aParams,
                                  const TInt aFlags );
@@ -94,7 +89,6 @@
     /**
      * Displays number query dialog
      *
-     * @since S60 v5.2
      * @param aEntry CVoiceMailboxEntry
      */
     void QueryDefineNumberL( CVoiceMailboxEntry& aEntry );
@@ -102,7 +96,6 @@
     /**
      * Displays number query dialog
      *
-     * @since S60 v5.2
      * @param aEntry Entry data
      */
     void QueryChangeNumberL( CVoiceMailboxEntry& aEntry );
@@ -112,7 +105,6 @@
     /**
      * C++ default constructor.
      *
-     * @since S60 v5.2
      * @param aProvider Reference to Ui Utilities
      */
     CVmbxVoIpEngine( MVmbxResourceProvider& aProvider );
@@ -120,13 +112,11 @@
     /**
      * By default Symbian 2nd phase constructor is private.
      *
-     * @since S60 v5.2
     */
     void ConstructL();
 
     /**
      * Check from SPSettings if there are VoIP profiles
-     * @since S60 3.2.3
      * @param None
      * @return ETrue if VoIP profiles were found, otherwise EFalse
      */
@@ -135,7 +125,6 @@
     /**
      * Checks the Voice Mailbox how many VoIP service Ids
      *
-     * @since S60 v5.2
      * @param aProfileIds
      * @return KErrNone if get service Ids successfully.
      */
@@ -143,7 +132,6 @@
 
     /**
      * Get branded icon
-     * @since S60 v5.2
      * @param in aBrandingId Brandind Id
      * @param out aBrandedBitmap Bitmap for branded icon
      * @param out aBrandedBitmapMask Mask to branded icon
@@ -154,13 +142,11 @@
     /**
      * see CVoiceMailbox::GetVmbxImage
      * 
-     * @since S60 v5.2
      */
     //CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams );
 
     /**
      * Get brand id
-     * @since S60 v5.2
      * @param in aServiceId Used Service
      * @param out aBrandId On completion, contains Brand Id
      */
@@ -168,7 +154,6 @@
 
     /**
      * Get service ids
-     * @since S60 v5.2
      * @param in&out aServiceInfo On completion contains service ids
      */
     TInt GetServiceInfo( TVmbxServiceInfo& aServiceInfo );
--- a/vmbx/vmbxengine/inc/voicemailboxdefsinternal.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/voicemailboxdefsinternal.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -23,6 +23,7 @@
 
 // CONSTANTS
 const TInt KVmLbxItemsArraySize = 3;
+const TInt KVmbxPhoneCharMaxLength = 48;
 
 /**Sim card voice mailbox file type*/
 enum TVmbxSimPhonebookType
@@ -123,10 +124,10 @@
     EInvalidNumber,
     ESavedToPhoneMemory,
     ESavedToSimMemory,
-    ENumberEmpty,
-    EVoiceNumberEmpty,
-    EVideoNumberEmpty,
-    EVideoNumberSaved
+    EVideoNumberSaved,
+    EDefineVoiceNumber,
+    EDefineVideoNumber,
+    ENotAllowUserEditing
     };   
 
 #endif // C_VOICEMAILBOXDEFSINTERNAL_H
--- a/vmbx/vmbxengine/inc/voicemailboximpl.h	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/inc/voicemailboximpl.h	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -41,7 +41,6 @@
 *  Implemets mailbox entry base class functionality
 *
 *  @lib vmbxengine.lib
-*  @since S60 v5.2
 */
 NONSHARABLE_CLASS( CVoiceMailboxImpl ) : public CBase,
                          public MVmbxChangeObserver,
@@ -70,7 +69,6 @@
     /**
      * see CVoiceMailbox::GetStoredEntry
      * 
-     * @since S60 v5.2
      */
     TInt GetStoredEntry( const TVoiceMailboxParams& aParams,
                                     CVoiceMailboxEntry*& aEntry ) const;
@@ -78,14 +76,12 @@
     /**
      * see CVoiceMailbox::SaveEntry
      * 
-     * @since S60 v5.2
      */
     TInt SaveEntry( const CVoiceMailboxEntry& aEntry );
 
     /**
      * see CVoiceMailbox::QueryNewEntry
      * 
-     * @since S60 v5.2
      */
     TInt QueryNewEntry( const TVoiceMailboxParams& aParams,
                                         CVoiceMailboxEntry*& aEntry );
@@ -93,7 +89,6 @@
     /**
      * see CVoiceMailbox::QueryChangeEntry
      * 
-     * @since S60 v5.2
      */
     TInt QueryChangeEntry( const TVoiceMailboxParams& aParams,
                                     CVoiceMailboxEntry*& aEntry);
@@ -101,14 +96,12 @@
     /**
      * see CVoiceMailbox::QueryVmbxType
      * 
-     * @since S60 v5.2
      */
     TInt QueryVmbxType( TVoiceMailboxParams& aParams );
 
     /**
      * see CVoiceMailbox::NotifyVmbxNumberChangeL
      * 
-     * @since S60 v5.2
      */
     void NotifyVmbxNumberChangeL( MVoiceMailboxObserver& aObserver,
                                      const TBool aNotifyOnActiveLineOnly );
@@ -116,7 +109,6 @@
     /**
      * see CVoiceMailbox::NotifyVmbxNumberChangeCancel
      * 
-     * @since S60 v5.2
      */
     void NotifyVmbxNumberChangeCancel();
 
@@ -131,21 +123,18 @@
     /**
      * see CVoiceMailbox::GetServiceIds
      * 
-     * @since S60 v5.2
      */
     TInt GetServiceIds( RIdArray& aProfileIds );
 
     /**
      * see CVoiceMailbox::GetVmbxImage
      * 
-     * @since S60 v5.2
      */
     //CGulIcon* GetVmbxImage( const TVoiceMailboxParams& aParams );
 
     /**
      * see CVoiceMailbox::GetVmbxImages
      * 
-     * @since S60 v5.2
      */
     //CArrayPtr<CGulIcon>* GetVmbxImages(
     //                        RArray<TVoiceMailboxParams>& aParams );
@@ -153,7 +142,6 @@
     /**
      * see CVoiceMailbox::SaveProvisionedEntry
      * 
-     * @since S60 v5.2
      */
     TInt SaveProvisionedEntry( const CVoiceMailboxEntry& aEntry );
 
@@ -163,21 +151,18 @@
     /**
      * see MVmbxChangeObserver::SatRefreshL
      * 
-     * @since S60 v5.2
      */
     void SatRefreshL();
 
     /**
      * see MVmbxChangeObserver::CenRepChangedL
      * 
-     * @since S60 v5.2
      */
     void CenRepChangedL( TVmbxCenRepKey aId );
 
     /**
      * see MVmbxChangeObserver::SimStoreChangedL
      * 
-     * @since S60 v5.2
      */
     void SimStoreChangedL();
 
@@ -186,7 +171,6 @@
     /**
      * Get Handler of VmbxUiUtilities
      *
-     * @since S60 v5.2
      * @return Refereance of MVmbxUiUtilities
      */
     MVmbxUiUtilities& VmbxUiUtilities();
@@ -194,7 +178,6 @@
     /**
      * Get Handler of VmbxCenrepHandler
      *
-     * @since S60 v5.2
      * @return Refereance of MVmbxCenrepHandler
      */
     MVmbxCenrepHandler& VmbxCenRepHandler();
@@ -211,7 +194,6 @@
     /**
      * ConstructL
      *
-     * @since S60 v5.2
      */
     void ConstructL();
 
@@ -221,7 +203,6 @@
      *       - KErrArgument when illegal argument
      *       - Other system wide errors.
      *
-     * @since S60 v5.2
      * @param in Params Service id and type of the mailbox for which
      *          a number/address should be defined.
      * @param out aEntry If successful, a new result container is
@@ -248,7 +229,6 @@
      *              for the specified mailbox.
      *         - Other system wide errors.
      *
-     * @since S60 v5.2
      * @param in aParams Service id and type of the mailbox for which
      *          a number/address should be defined.
      * @param out aEntry If successful, a new result container is
@@ -268,7 +248,6 @@
      * In that case unsupported arguments are ignored.
      * This method may display related UI notes or queries.
      *
-     * @since S60 v5.2
      * @param in aEntry The vmbx entry to save.
      */
     void SaveEntryL( const CVoiceMailboxEntry& aEntry );
@@ -291,7 +270,6 @@
      *              for the specified mailbox.
      *         - Other system wide errors.
      *
-     * @since S60 v5.2
      * @param in aParams Service id and type of the mailbox.
      * @param out aEntry If successful, a new result container is
      */
@@ -308,7 +286,6 @@
      *             type given.
      *         - Other system wide errors.
      *
-     * @since S60 v5.2
      * @param out aParams If successful,
      *          contains selected mailbox info.
      */
@@ -318,7 +295,6 @@
      * Get defined entries via an array
      * Leave with symbian OS error code except KErrNotFound and KErrSupported.
      *
-     * @since S60 v5.2
      * @param out aArray array contains the defined entries
      */
     void GetDefinedEntriesL( RPointerArray<CVoiceMailboxEntry>& aArray );
@@ -327,7 +303,6 @@
      * Get defined voice entry via an array
      *  Leave with symbian OS error code except KErrSupported.
      *
-     * @since S60 v5.2
      * @param out aArray array contains the defined entries
      */
     void GetDefinedVoiceEntryL( 
@@ -337,7 +312,6 @@
      * Get defined video entry via an array
      * Leave with symbian OS error code except KErrNotFound and KErrSupported.
      *
-     * @since S60 v5.2
      * @param out ay array contains the defined entries
      */
     void GetDefinedVideoEntryL( 
@@ -347,7 +321,6 @@
      * Get defined voip entries via an array
      * Leave with symbian OS error code except KErrNotFound and KErrSupported.
      *
-     * @since S60 v5.2
      * @param out aArray array contains the defined entries
      */
     void GetDefinedVoipEntriesL( 
@@ -357,7 +330,6 @@
      * Checks the Voice Mailbox how many VoIP service Ids
      * Leave with symbian OS error code
      *
-     * @since S60 v5.2
      * @param out aProfileIds
      * @return KErrNone if get service Ids successfully.
      */
@@ -369,7 +341,6 @@
      * Image can be displayed e.g. in a selection list.
      * Leave with symbian OS error code.
      *
-     * @since S60 v5.2
      * @param in aParams Mailbox service id and type for which image is needed.
      * @return aImage New image. Ownership is transferred.
      */
@@ -387,7 +358,6 @@
      * NULL array pointer is returned if not a signle icon was retrieved
      * successfully.
      *
-     * @since S60 v5.2
      * @param in aParams Mailboxes (id and type) for which an image is needed.
      * @return aImage Icons for the specified mailboxes.
      *          Index of an image in the returned array corresponds to the
@@ -403,7 +373,6 @@
      * Notify entry changed
      * Leave with symbian OS error code.
      *
-     * @since S60 v5.2
      * @param in aType Type of TVmbxType
      */
     void NotifyChangedL( TVmbxType aType);
@@ -419,11 +388,18 @@
      * Some mailbox types may not support saving all arguments.
      * In that case unsupported arguments are ignored.
      *
-     * @since S60 v5.2
      * @param in aEntry The provisioned vmbx entry to save.
      */
     void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry );
 
+    /**
+     * Check number provisioned or not
+     * Leave if systrm wide errors
+     *
+     * @param in aParams params of TVoiceMailboxParams
+     */
+    void CheckNumberProvisionedL( const TVoiceMailboxParams& aParams );
+
 protected: // data
 
     /**
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/rom/vmbxresources.iby	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef __VMBXRESOURCES_IBY__
+#define __VMBXRESOURCES_IBY__
+   
+#include <data_caging_paths_for_iby.hrh>
+
+data=DATAZ_\QT_TRANSLATIONS_DIR\vmbx.qm  QT_TRANSLATIONS_DIR\vmbx.qm
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/dialogwaiter.cpp	Fri May 14 16:24:46 2010 +0300
@@ -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: dialog waiter
+*
+*
+*/
+
+#include "dialogwaiter.h"
+
+HbAction* DialogWaiter::wait()
+{
+    mLoop.exec();
+    HbAction* a=mResult;
+    mResult=0;
+    return a;
+}
+
+void DialogWaiter::done(HbAction* result)
+{
+    mResult=result;
+    mLoop.quit();
+}
+
--- a/vmbx/vmbxengine/src/vmbxcenrephandler.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/src/vmbxcenrephandler.cpp	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -241,6 +241,9 @@
     VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::StoreType: result = %d",
              result );
 
+    VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::StoreType: location = %d<=",
+             location );
+
     if ( KErrNone == result && EVmbxSimMemory == location )
         {
         memoryLocation = EVmbxSimMemory;
--- a/vmbx/vmbxengine/src/vmbxcsvideoengine.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/src/vmbxcsvideoengine.cpp	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -134,19 +134,7 @@
     // show note
     if ( KErrNone == result )
         {
-        if ( vmbxNumber.Length() )
-            {
-             VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::\
-                 Save Number Length" );
-             iProvider.VmbxUiUtilities().ShowVideoSavedNote();
-             }
-        else
-            {
-             VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::\
-                                Save Number Length zero" );
-             iProvider.VmbxUiUtilities().ShowSaveEmptyNoteL(
-                                             aEntry.VoiceMailboxType() );
-             }
+        iProvider.VmbxUiUtilities().ShowInformationdNoteL( EVideoNumberSaved );
         }
 
     VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::SaveL <=" );
@@ -165,4 +153,29 @@
     VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::SaveProvisionedEntryL <=" );
     }
 
+// ----------------------------------------------------------------------------
+//  CVmbxCsVideoEngine::CheckConfiguration()
+// ----------------------------------------------------------------------------
+//
+TBool CVmbxCsVideoEngine::CheckConfiguration( 
+            const TVoiceMailboxParams& aParams, const TInt aFlags )
+    {
+    VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::CheckConfiguration =>" );
+    TBool conf( EFalse );
+    if ( EVmbxChangeNbrAllowedOnUi & aFlags )
+        {
+        conf = iProvider.VmbxCenRepHandler().IsAllowedUserEdit();
+        }
+    else if ( EVmbxVideoMailboxSupported & aFlags )
+        {
+        conf = ETrue;
+        }
+    else
+        {
+        conf = CVmbxEngineBase::CheckConfiguration(aParams, aFlags);
+        }
+    VMBLOGSTRING2( "VMBX: CVmbxCsVideoEngine::CheckConfiguration: conf%I <=",
+                 conf );
+    return conf;
+    }
 // End of file
--- a/vmbx/vmbxengine/src/vmbxcsvoiceengine.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/src/vmbxcsvoiceengine.cpp	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -113,7 +113,7 @@
     vmbxEntry->SetVmbxAlsLineType( VmbxUtilities::AlsLine() );
 
     vmbxEntry->SetVoiceMailboxType( EVmbxVoice );
-    vmbxEntry->SetServiceId( KVmbxServiceVideo );
+    vmbxEntry->SetServiceId( KVmbxServiceVoice );
     // get store type from CenRep 
     TVmbxMemoryLocation storeType = iProvider.VmbxCenRepHandler().StoreType();
 
@@ -242,7 +242,7 @@
     VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::CheckConfiguration =>" );
     TBool configuration( EFalse );
     // check thr property whether allow user to edit number 
-    if ( EVmbxChangeNbrNotAllowedOnUi & aFlags )
+    if ( EVmbxChangeNbrAllowedOnUi & aFlags )
         {
         configuration = iProvider.VmbxCenRepHandler().IsAllowedUserEdit();
         if ( configuration )
@@ -250,6 +250,10 @@
             configuration = IsWritable( aParams );
             }
         }
+    else
+        {
+        configuration = CVmbxEngineBase::CheckConfiguration(aParams, aFlags);
+        }
     VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::CheckConfiguration: conf%I <=",
                  configuration );
     return configuration;
@@ -269,22 +273,7 @@
 
     if ( KErrNone == result )
         {
-        // observer to change vmbx number
-        TPtrC vmbxNumber( KNullDesC );
-        aEntry.GetVmbxNumber( vmbxNumber );
-        if ( vmbxNumber.Length() )
-            {
-            VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::\
-                SaveEntryToPhone Number Length" )
-            iProvider.VmbxUiUtilities().ShowSaveToPhoneNote();
-            }
-        else
-            {
-            VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::\
-                SaveEntryToPhone Number Length zero" )
-             iProvider.VmbxUiUtilities().ShowSaveEmptyNoteL(
-                                        aEntry.VoiceMailboxType() );
-            }
+        iProvider.VmbxUiUtilities().ShowInformationdNoteL( ESavedToPhoneMemory );
         }
     VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::SaveEntryToPhoneL: result=%I <=",
                              result );
@@ -314,19 +303,7 @@
         result = iSimHandler->Save( aEntry );
        if ( KErrNone == result )
             {
-            if ( ptrNumber.Length() )
-                {
-                VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::\
-                    SaveEntryToSim Number Length" )
-                iProvider.VmbxUiUtilities().ShowSaveToSimNote();
-                }
-            else
-                {
-                VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::\
-                    SaveEntryToPhone Number Length zero" )
-                TRAP_IGNORE(  iProvider.VmbxUiUtilities().
-                ShowSaveEmptyNoteL( aEntry.VoiceMailboxType() ) );
-                }
+            iProvider.VmbxUiUtilities().ShowInformationdNoteL( ESavedToSimMemory );
             }
         }
 
@@ -344,8 +321,8 @@
     {
     VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::IsSimWritable: =>" );
     TBool result( EFalse );
-    if ( iSimHandler && iSimHandler->IsWritable() 
-        && !( iProvider.VmbxCenRepHandler().IsSimReadOnly() ) )
+    if ( !( iProvider.VmbxCenRepHandler().IsSimReadOnly() ) 
+        && iSimHandler && iSimHandler->IsWritable() )
         {
         result = ETrue;
         }
--- a/vmbx/vmbxengine/src/vmbxenginebase.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/src/vmbxenginebase.cpp	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -86,7 +86,7 @@
     }
 
 // ----------------------------------------------------------------------------
-//  CVmbxEngineBase::CheckConfiguration()
+//  CVmbxCsVideoEngine::CheckConfiguration()
 // ----------------------------------------------------------------------------
 //
 TBool CVmbxEngineBase::CheckConfiguration( 
@@ -94,9 +94,17 @@
     {
     VMBLOGSTRING( "VMBX: CVmbxEngineBase::CheckConfiguration =>" );
     TBool conf( EFalse );
-    if ( EVmbxChangeNbrNotAllowedOnUi & aFlags )
+    if ( EVmbxChangeNbrAllowedOnUi & aFlags )
+        {
+        // NOT suppported as default
+        }
+    else if ( EVmbxVideoMailboxSupported & aFlags )
         {
-        conf = iProvider.VmbxCenRepHandler().IsAllowedUserEdit();
+        // NOT suppported as default
+        }
+    else
+        {
+        // default
         }
     VMBLOGSTRING2( "VMBX: CVmbxEngineBase::CheckConfiguration: conf%I <=",
                  conf );
@@ -134,7 +142,7 @@
     TInt err( KErrNone );
     TPtrC vmbxNumber( KNullDesC );
     err = aEntry.GetVmbxNumber( vmbxNumber );
- 
+
     if ( KErrNone == err )
         {
         HBufC* changeNumber = HBufC::NewLC( KVmbxMaxNumberLength );
--- a/vmbx/vmbxengine/src/vmbxpbkstore.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/src/vmbxpbkstore.cpp	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -24,9 +24,11 @@
 #include "vmbxutilities.h"
 #include "vmbxetelconnection.h"
 #include "vmbxlogger.h"
-
 #include "vmbxpbkstore.h"
 
+#include <e32property.h>
+#include <simutils.h>
+#include <startupdomainpskeys.h>
 //CONSTANTS
 // Amount of retries to be performed.
 const TInt KVmbxPhonebookBufferSize( 150 );
@@ -87,33 +89,42 @@
 void CVmbxPbkStore::ConstructL()
     {
     VMBLOGSTRING( "VMBX: CVmbxPbkStore::ConstructL =>" );
+    TInt value( 0 );
+    TInt res = RProperty::Get( KPSUidStartup, KPSSimStatus, value );
+    VMBLOGSTRING2( "VMBX: CVmbxPbkStore::ConstructL res = %d", res );
+    VMBLOGSTRING2( "VMBX: CVmbxPbkStore::ConstructL value = %d", value );
+    if ( (ESimUsable != value && ESimReadable != value ) || KErrNone != res )
+        {
+        // Sim card not ready to use
+        User::Leave( KErrNotReady );
+        }
     // Open tel server and phone
     iETelConnection = CVmbxETelConnection::NewL();
 
     iWait = new( ELeave ) CActiveSchedulerWait; 
     TVmbxAlsLineType alsLine = VmbxUtilities::AlsLine();
 
-    // Supported ALS line
+    // Supported ALS line,ALS line on
     if ( EVmbxAlsLineDefault != alsLine )
         {
-        // open 6f17 file
+        // open 6f17 file ,if not found the file, leave
         User::LeaveIfError( OpenVmbxPhonebook() );
         }
-    // Not supported ALS line
+    // Not supported ALS line,ALS line off
     else
         {
-        // USIM exist
-        if ( SimFileExistsAndReadAccess() )
+        // Open 6fc7 file, if not found, open 6f17 file
+        TInt result = OpenMbdnPhonebook();
+        if ( KErrPathNotFound == result )
             {
-            // Open 6fc7 file
-            User::LeaveIfError( OpenMbdnPhonebook() );
+            //close 6fc7 and open 6f17 file
+            iPhoneBook.Close();
+            // open 6f17 file ,if not found the file, leave
+            User::LeaveIfError( OpenVmbxPhonebook() );
             }
-        // USIM not exist, open 6f17 file
         else
             {
-            VMBLOGSTRING( "VMBX: CVmbxPbkStore::ConstructL: no mbdn file\
-                then open 6f17 file" );
-            User::LeaveIfError( OpenVmbxPhonebook() );
+            User::LeaveIfError( result );
             }
         }
     VMBLOGSTRING( "VMBX: CVmbxPbkStore::ConstructL <=" );
@@ -142,7 +153,6 @@
         VMBLOGSTRING2( "VMBX: CVmbxPbkStore::PhonebookInfo: \
                 SIM Phonebook info read, status: %I", result );
         }
-
     VMBLOGSTRING( "VMBX: CVmbxPbkStore::GetVmbxInfo <=" );
     return result;
     }
@@ -156,16 +166,41 @@
     {
     VMBLOGSTRING( "VMBX: CVmbxPbkStore::IsWritable =>" );
     TBool result( EFalse );
-    RMobilePhoneBookStore::TMobilePhoneBookInfoV1 info;
-    TInt temp = GetVmbxInfo( info );
-    if( KErrNone == temp )
+    if ( IsWriteAccess() )
         {
-        result = ( info.iCaps &
-                RMobilePhoneBookStore::KCapsWriteAccess ? 1 : 0 );
-        
+        // Get current sim entry, then write the same entry 
+        // to sim if read successufully
+        CVoiceMailboxEntry* simEntry(NULL);
+        TRAPD( newErr, simEntry = CVoiceMailboxEntry::NewL() );
+        VMBLOGSTRING2( "VMBX: CVmbxPbkStore::IsWritable newErr = %d ",
+            newErr );
+        if ( KErrNone == newErr )
+            {
+            // get als line info
+            simEntry->SetVmbxAlsLineType( VmbxUtilities::AlsLine() );
+            simEntry->SetVoiceMailboxType( EVmbxVoice );
+            simEntry->SetServiceId( KVmbxServiceVoice );
+            TRAPD( err, SimReadL( *simEntry ) );
+            VMBLOGSTRING2( "VMBX: CVmbxPbkStore:: IsWritable read %I <=", err );
+            if ( KErrNotFound == err )
+                {
+                simEntry->SetVmbxNumber( KNullDesC );
+                }
+            if ( KErrNone == err || KErrNotFound == err )
+                {
+                err = Write( *simEntry );
+                VMBLOGSTRING2( "VMBX: CVmbxPbkStore:: IsWritable write %I <=",
+                    err );
+                // If write successfully, means writable
+                if ( KErrNone == err )
+                    {
+                    result = ETrue;
+                    }
+                 }
+           }
+        delete simEntry;
+        simEntry = NULL;
         }
-    VMBLOGSTRING2( "VMBX: CVmbxPbkStore:: IsWritable: info.iCaps %I",
-                     info.iCaps );
     VMBLOGSTRING2( "VMBX: CVmbxPbkStore:: IsWritable result %I <=", result );
     return result;
     }
@@ -205,39 +240,43 @@
         {
         pbkBuffer->Set( &pbData );
         TInt activeAlsLine = aEntry.VmbxAlsLineType();
+        // Add index, const value for vmbx write.
+        int entryIndex = 1;
         // New entry
         result = pbkBuffer->AddNewEntryTag();
         if ( KErrNone == result )
             {
-            // Add index
             // Type of index is TUint16 in Multimode ETel and TInt in old ETel.
             result = pbkBuffer->PutTagAndValue( 
-            RMobilePhoneBookStore::ETagPBAdnIndex, (TUint16)activeAlsLine );
-            }
-        // Add name if it existed on SIM card
-        // Type of ETagPBText is TDes16
-        if ( KErrNone == result && iAlphaStringFromSIM )
-            {
-            result = pbkBuffer->PutTagAndValue( 
-            RMobilePhoneBookStore::ETagPBText, *iAlphaStringFromSIM );
-            // Add number,Type of ETagPBNumber is TDes16
+            RMobilePhoneBookStore::ETagPBAdnIndex, (TUint16)entryIndex );
+            VMBLOGSTRING2( "VMBX: CVmbxPbkStore::Write: ETagPBAdnIndex \
+                    result=%I",  result );
+            // Add name if it existed on SIM card,Type of ETagPBText is TDes16
+            if ( iAlphaStringFromSIM )
+                {
+                result = pbkBuffer->PutTagAndValue( 
+                RMobilePhoneBookStore::ETagPBText, *iAlphaStringFromSIM );
+                VMBLOGSTRING2( "VMBX: CVmbxPbkStore::Write: ETagPBText\
+                        result=%I",  result );
+                }
+            TPtrC vmbxNumber( KNullDesC );
+            result = aEntry.GetVmbxNumber( vmbxNumber );
             if ( KErrNone == result )
                 {
-                TPtrC vmbxNumber( KNullDesC );
-                result = aEntry.GetVmbxNumber( vmbxNumber );
-                if ( KErrNone == result )
-                    {
-                    result = pbkBuffer->PutTagAndValue( 
-                    RMobilePhoneBookStore::ETagPBNumber, vmbxNumber );
-                    }
+                // Add number,Type of ETagPBNumber is TDes16
+                result = pbkBuffer->PutTagAndValue( 
+                RMobilePhoneBookStore::ETagPBNumber, vmbxNumber );
+                VMBLOGSTRING2( "VMBX: CVmbxPbkStore::Write: ETagPBNumber\
+                        result=%I",  result );
                 }
             }
+
         if ( KErrNone == result )
             {
             if ( iPhoneBookType == EMBDNPhoneBook )
                 {
                 RMobilePhone::TMobilePhoneVoicemailIdsV3 mbdnInfo;
-                result = GetMbdnInfo( EVmbxAlsLine1, mbdnInfo );
+                result = GetMbdnInfo( VmbxUtilities::AlsLine(), mbdnInfo );
 
                 if ( KErrNone == result )
                     {
@@ -260,7 +299,7 @@
                 if( !IsActive() && !iWait->IsStarted() )
                     {
                     // write vmbx number to 6f17 file
-                    iPhoneBook.Write( iStatus, pbData, activeAlsLine );
+                    iPhoneBook.Write( iStatus, pbData, entryIndex );
                     iAsynType = EVmbxSimEntryWrite;
                     // Wait for asynchronous call to finish
                     SetActive();
@@ -278,7 +317,7 @@
 
 // ---------------------------------------------------------------------------
 // CVmbxPbkStore::PhonebookStore
-// Return Phonebook
+// Return RMobilePhoneBookStore
 // ---------------------------------------------------------------------------
 RMobilePhoneBookStore& CVmbxPbkStore::PhonebookStore()
     {
@@ -323,10 +362,12 @@
             result = iStatus.Int();
             }
 
-        if ( EVmbxAlsLineDefault == aAlsLine && KErrNone == result )
+        if ( EVmbxAlsLineDefault == aAlsLine )
             {
             aInfo.iVoice =  EVmbxAlsLine1;
             }
+        VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetMbdnInfo: aInfo.iVoice %I",
+            aInfo.iVoice );
         }
     VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetMbdnInfo: result %I<=",
          result );
@@ -341,16 +382,21 @@
 TInt CVmbxPbkStore::OpenMbdnPhonebook()
     {
     VMBLOGSTRING( "VMBX: CVmbxPbkStore::OpenMbdnPhonebook =>" );
-    // try to open mbdn-type phonebook
+    //Open mbdn-type phonebook , Currently the file not exist, thr return
+    // value also KErrNone
     TInt result = iPhoneBook.Open( iETelConnection->Phone(),
                                          KETelIccMbdnPhoneBook );
     VMBLOGSTRING2( "VMBX: CVmbxPbkStore::OpenMbdnPhonebook :\
-        MBDN opening result = %I", result );
-    if ( KErrNone == result )
+        MBDN opening result = %d", result );
+
+    TBool res = IsSimFileExisting( EMBDNPhoneBook );
+    VMBLOGSTRING2( "VMBX: CVmbxPbkStore::OpenMbdnPhonebook :\
+        MBDN reading res = %d", res );
+    if ( !res )
         {
-        iPhoneBookType = EMBDNPhoneBook;
+        result = KErrPathNotFound;
         }
-    VMBLOGSTRING( "VMBX: CVmbxPbkStore::OpenMbdnPhonebook <=" );
+    VMBLOGSTRING2( "VMBX: CVmbxPbkStore::OpenMbdnPhonebook res = %d<=", result );
     return result;
     }
 
@@ -362,15 +408,20 @@
 TInt CVmbxPbkStore::OpenVmbxPhonebook()
     {
     VMBLOGSTRING( "VMBX: CVmbxPbkStore::OpenVmbxPhonebook =>" );
-    // try to open vmbx-type phonebook
+    //Open vmbx-type phonebook , Currently the file not exist, thr return
+    // value also KErrNone
     TInt result = iPhoneBook.Open( iETelConnection->Phone(),
                                                  KETelIccVoiceMailBox );
-    if ( KErrNone == result )
+    VMBLOGSTRING2( "VMBX: CVmbxPbkStore::OpenVmbxPhonebook :\
+        Vmbx opening result = %d", result );
+    TBool res = IsSimFileExisting( EVMBXPhoneBook );
+    VMBLOGSTRING2( "VMBX: CVmbxPbkStore::OpenVmbxPhonebook :\
+        Vmbx reading res = %d", res );
+    if ( !res )
         {
-        iPhoneBookType = EVMBXPhoneBook;
+        result = KErrPathNotFound;
         }
-    VMBLOGSTRING2( "Vmbx phonebook opening result = %I ", result );
-    VMBLOGSTRING( "VMBX: CVmbxPbkStore::OpenVmbxPhonebook <=" );
+    VMBLOGSTRING2( "VMBX: CVmbxPbkStore::OpenVmbxPhonebook result=%d <=", result );
     return result;
     }
 
@@ -404,7 +455,7 @@
             User::LeaveIfError( OpenVmbxPhonebook() );
             // read vmbx number from 6f17 file
             SimReadL( aEntry );
-            } 
+            }
         }
     else
         {
@@ -445,7 +496,7 @@
                 // Wait for asynchronous call to finish
                 SetActive();
                 iWait->Start();
-                }         
+                }
             }
         }
     else
@@ -454,10 +505,16 @@
         // line2 number so line is used to fetch
         VMBLOGSTRING( "start VMBX PhoneBook read" );
         TInt activeAlsLine = aEntry.VmbxAlsLineType();
+        if ( EVmbxAlsLineDefault == activeAlsLine )
+            {
+            activeAlsLine = EVmbxAlsLine1;
+            }
          if( !IsActive() && !iWait->IsStarted() )
             {
             result = KErrNone;
             // read vmbx number from 6f17 file
+            VMBLOGSTRING2( "VMBX: CVmbxPbkStore::SimReadLactiveAlsLine = %I",
+                 activeAlsLine );
             iPhoneBook.Read( iStatus, activeAlsLine, numEntries, pbData );
             iAsynType = EVmbxSimEntryRead;
             // Wait for asynchronous call to finish
@@ -484,7 +541,7 @@
 
 // ---------------------------------------------------------------------------
 // CVmbxPbkStore::ParseDataL
-// read vmbx number from sim
+// 
 // ---------------------------------------------------------------------------
 //
 void CVmbxPbkStore::ParseDataL( CVoiceMailboxEntry& aEntry, TDes8& aPbData )
@@ -641,34 +698,8 @@
     }
 
 // ---------------------------------------------------------------------------
-// CVmbxPbkStore::IsUsimSupport
-// Checks if USim card in the phone
-// ---------------------------------------------------------------------------
-TBool CVmbxPbkStore::SimFileExistsAndReadAccess()
-    {
-    VMBLOGSTRING( "VMBX: CVmbxPbkStore::SimFileExistsAndReadAccess =>" );
-    TBool result( EFalse );
-
-    TUint32 capability;
-    TInt err = iETelConnection->Phone().GetIccAccessCaps( capability );
-    VMBLOGSTRING2( "VMBX: CVmbxSimHandler::SimFileExistsAndReadAccess:\
-        Err = %I", err);
-
-    if ( err == KErrNone &&
-        // Phone has a USIM and it currently supports USIM access by clients.
-        // the current sim card is 3G
-         capability & RMobilePhone::KCapsUSimAccessSupported )
-        {
-        result = ETrue;
-        }
-    VMBLOGSTRING2( "VMBX: CVmbxPbkStore::SimFileExistsAndReadAccess \
-        return = %d <=", result );
-    return result;
-    }
-
-// ---------------------------------------------------------------------------
 // CVmbxPbkStore::RunL
-// read vmbx number from sim
+// 
 // ---------------------------------------------------------------------------
 //
 void CVmbxPbkStore::RunL()
@@ -686,7 +717,7 @@
 
 // ---------------------------------------------------------------------------
 // CVmbxPbkStore::DoCancel
-// read vmbx number from sim
+// 
 // ---------------------------------------------------------------------------
 //
 void CVmbxPbkStore::DoCancel()
@@ -724,16 +755,16 @@
             iETelConnection->Phone().CancelAsyncRequest( 
                                                EMobilePhoneStoreRead );
             break;
-            }                                        
+            }
         case EVmbxSimEntryWrite:
             {
             VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel : EVmbxSimEntryWrite" );
             iETelConnection->Phone().CancelAsyncRequest( 
                                                EMobilePhoneStoreWrite );
             break;
-            }                                        
+            }
         default:
-            break;   
+            break;
         }
     
     VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel <=" );
@@ -741,13 +772,73 @@
 
 // ---------------------------------------------------------------------------
 // CVmbxPbkStore::RunError
-// read vmbx number from sim
+// 
 // ---------------------------------------------------------------------------
 //
 TInt CVmbxPbkStore::RunError(TInt aError)
     {
+    // Avoid warning
+    aError = aError;
     VMBLOGSTRING2( "VMBX: CVmbxPbkStore::RunError: %I", aError );
     return KErrNone;
     }
 
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::IsSimFileExisting
+// check sim file existing or not
+// ---------------------------------------------------------------------------
+//
+TBool CVmbxPbkStore::IsSimFileExisting( const TVmbxSimPhonebookType aType )
+    {
+    VMBLOGSTRING( "VMBX: CVmbxPbkStore::IsSimFileExisting =>" );
+    iPhoneBookType = aType;
+    TBool result( ETrue );
+    CVoiceMailboxEntry* entry(NULL);
+    TRAPD( err, entry = CVoiceMailboxEntry::NewL() );
+    VMBLOGSTRING2( "VMBX: CVmbxPbkStore::IsSimFileExisting err = %d ",
+     err );
+    if ( KErrNone != err )
+        {
+        result = EFalse;
+        }
+    else
+        {
+        entry->SetVoiceMailboxType( EVmbxVoice );
+        TRAPD( err, SimReadL( *entry ) );
+        // KErrPathNotFound means when current file path not found.
+        if ( KErrPathNotFound == err )
+            {
+            result = EFalse;
+            }
+        }
+    delete entry;
+    entry = NULL;
+    VMBLOGSTRING2( "VMBX: CVmbxPbkStore::IsSimFileExisting result = %d <= ",
+         result );
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::IsWriteAccess
+// Sim write access support
+// ---------------------------------------------------------------------------
+//
+TBool CVmbxPbkStore::IsWriteAccess()
+    {
+    VMBLOGSTRING( "VMBX: CVmbxPbkStore::IsWriteAccess =>" );
+    TBool result( EFalse );
+    RMobilePhoneBookStore::TMobilePhoneBookInfoV1 info;
+    TInt temp = GetVmbxInfo( info );
+    if( KErrNone == temp )
+        {
+        result = ( info.iCaps &
+                RMobilePhoneBookStore::KCapsWriteAccess ? ETrue : EFalse );
+        
+        }
+    VMBLOGSTRING2( "VMBX: CVmbxPbkStore:: IsWriteAccess: info.iCaps %X",
+                     info.iCaps );
+    VMBLOGSTRING2( "VMBX: CVmbxPbkStore:: IsWriteAccess result %I <=", result );
+    return result;
+    }
+
 //End of file
--- a/vmbx/vmbxengine/src/vmbxqtuihandler.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/src/vmbxqtuihandler.cpp	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -17,19 +17,23 @@
 */
 
 // qt
-#include <QtGui/QtGui>
 #include <QString>
-#include <QObject>
+#include <QCoreApplication>
+#include <QRegExp>
 
-#include <hbdialog.h>
+#include <hbinputdialog.h>
 #include <hblabel.h>
 #include <hbaction.h>
-#include <hbtextedit.h>
 #include <hbmessagebox.h>
-#include <hbvalidator.h>
 #include <hblineedit.h>
 #include <hbinputeditorinterface.h>
+#include <hbinputstandardfilters.h>
+#include <hbinputfilter.h> 
 #include <hblistwidget.h>
+#include <dialogwaiter.h>
+
+#include <cvoicemailboxentry.h>
+#include <cvoicemailbox.h>
 
 #include "vmbxqtuihandler.h"
 #include "voicemailboxdefsinternal.h"
@@ -42,9 +46,11 @@
 // (Constructor).
 // ----------------------------------------------------------------------------
 //
-VmbxQtUiHandler::VmbxQtUiHandler(QObject* parent): QObject(parent)
+VmbxQtUiHandler::VmbxQtUiHandler(QObject* parent): QObject(parent),
+        iTranslator(0), iCommonTranslator(0), iQueryDialog(NULL)
 {
     VMBLOGSTRING("VmbxQtUiHandler::VmbxQtUiHandler")
+    init();
     VMBLOGSTRING("VmbxQtUiHandler::VmbxQtUiHandler Exit")
 }
 
@@ -56,88 +62,95 @@
 VmbxQtUiHandler::~VmbxQtUiHandler()
 {
     VMBLOGSTRING("VmbxQtUiHandler::~VmbxQtUiHandler")
+    if ( iQueryDialog ) {
+        delete iQueryDialog;
+        iQueryDialog = NULL;
+        VMBLOGSTRING("VmbxQtUiHandler::~VmbxQtUiHandler delete iQueryDialog")
+    }
     VMBLOGSTRING("VmbxQtUiHandler::~VmbxQtUiHandler Exit")
 }
 
 // ----------------------------------------------------------------------------
+// VmbxQtUiHandler::Init
+//
+// ----------------------------------------------------------------------------
+//
+void  VmbxQtUiHandler::init()
+{
+    VMBLOGSTRING("VmbxQtUiHandler::init")
+    QString lang = QLocale::system().name();
+    VMBLOGSTRING2("VmbxQtUiHandler::init lang type %S",
+            lang.utf16())
+    QString path = "Z:/resource/qt/translations/";
+    bool translatorLoaded = iTranslator.load("vmbx_"+lang, path);
+    VMBLOGSTRING2("VmbxQtUiHandler::init load vmbx result %d",
+            translatorLoaded)
+    // Install vmbx localization
+    if (translatorLoaded && qApp) {
+        VMBLOGSTRING("VmbxQtUiHandler::init qApp !")
+        qApp->installTranslator(&iTranslator);
+    }
+    // Install common localization, for select type "cancel".
+    bool loaded = iCommonTranslator.load( "common_"+lang, path);
+    VMBLOGSTRING2("VmbxQtUiHandler::init load common result %d",
+        loaded)
+    if (loaded && qApp) {
+        VMBLOGSTRING("VmbxQtUiHandler::init qApp !!")
+        qApp->installTranslator(&iCommonTranslator);
+    }
+    VMBLOGSTRING("VmbxQtUiHandler::init Exit")
+}
+
+// ----------------------------------------------------------------------------
 // VmbxQtUiHandler::ShowVmbxQueryDialog
 // (show query dialog).
 // ----------------------------------------------------------------------------
 //
 void VmbxQtUiHandler::showVmbxQueryDialog(const TVmbxType& aType,
-                          const TVmbxQueryMode& aMode,
                           QString& aNumber, int& aResult)
 {
     VMBLOGSTRING("VmbxQtUiHandler::showVmbxQueryDialog")
-
-    HbDialog *displayPopup = new HbDialog();
-    displayPopup->setDismissPolicy(HbDialog ::NoDismiss);
-    displayPopup->setTimeout(HbDialog ::NoTimeout);
-
-    displayPopup->setModal(true);
     QString header;
     if (EVmbxVoice == aType) {
-        if (EVmbxDefineMode == aMode) {
-            header = tr("Define voice mailbox:");
-        } else {
-            header = tr("Change voice mailbox:");
-        }
+        header = hbTrId("txt_vmbx_title_voice_mailbox_number");
+    } else if (EVmbxVideo == aType) {
+        // type of EVmbxVideo
+        header = hbTrId("txt_vmbx_title_video_mailbox_number");
     } else {
-        // type of EVmbxVideo
-        if (EVmbxDefineMode == aMode) {
-            header = tr("Define video mailbox:");
-        } else {
-            header = tr("Change video mailbox:");
-        }
+        aResult = KErrCancel;
+        VMBLOGSTRING( "VmbxQtUiHandler::showVmbxQueryDialog type error" )
+        return;
     }
-    // Set the label as heading widget
-    displayPopup->setHeadingWidget(new HbLabel(header));
-    // Set the HbLineEdit as Content widget
-    // Define parameters for text box
-    HbLineEdit *lineEdit = new HbLineEdit();
-    lineEdit->setText( aNumber ); // default text
-    //lineEdit->setMaximumRows( 3 ); // just a magic number
-    HbEditorInterface inputMode(lineEdit); // Enables VKB
-    inputMode.setInputMode( HbInputModeNumeric );
-    // Limit charachter set
-    HbValidator *val = new HbValidator;
-    QRegExp r;
-    r.setPattern("[0123456789*#+]{0,255}"); // define what characters can be entered
-    val->setMasterValidator(new QRegExpValidator(r,0));
-    lineEdit->setValidator( val );
+    iQueryDialog = new HbInputDialog();
+    iQueryDialog->setDismissPolicy(HbDialog::NoDismiss);
+    iQueryDialog->setTimeout(HbDialog::NoTimeout);
 
-    displayPopup->setContentWidget( lineEdit ); // ownership moved
+    iQueryDialog->setModal(true);
+    // Set heading content
+    iQueryDialog->setPromptText(header);
 
-    HbAction* okAction = new HbAction(tr("Ok"));
-    // Sets the "OK"-action/button
-    displayPopup->setPrimaryAction(okAction);
-    bool ret = connect(okAction, SIGNAL(triggered()),
-        displayPopup, SLOT(close()));
-    VMBLOGSTRING2( "VmbxQtUiHandler::showVmbxQueryDialog:connect ok %d",
-        ret )
-    //  Sets the "Back"-action/button
-    HbAction* cancelAction =  new HbAction(tr("Cancel"));
-    displayPopup->setSecondaryAction(cancelAction);
-    ret = connect(okAction, SIGNAL(triggered()),
-        displayPopup, SLOT(close()));
-    VMBLOGSTRING2( "VmbxQtUiHandler::showVmbxQueryDialog:connect cancel %d",
-        ret )
-    VMBLOGSTRING( "VmbxQtUiHandler::ShowVmbxQueryDialog to show" )
-    HbAction* result = displayPopup->exec();
-    if( okAction == result ) {
+    // Set HbLineEdit  Content 
+    iQueryDialog->lineEdit()->setText(aNumber); // default text
+    iQueryDialog->lineEdit()->setFocus(); // Enable the VKB
+    iQueryDialog->lineEdit()->setMaxLength(KVmbxPhoneCharMaxLength);
+    HbEditorInterface inputMode(iQueryDialog->lineEdit());
+    inputMode.setFilter(HbPhoneNumberFilter::instance());
+    bool ret = connect(iQueryDialog->lineEdit(), SIGNAL(textChanged(QString)),
+        this, SLOT(updatePrimaryAction(QString)));    
+    VMBLOGSTRING2( "VmbxQtUiHandler::showVmbxQueryDialog connect textChanged %d", ret)
+    DialogWaiter waiter;
+    iQueryDialog->open(&waiter, SLOT(done(HbAction *)));
+    HbAction *result = waiter.wait();
+    if (result == iQueryDialog->primaryAction()) {
         VMBLOGSTRING( "VmbxQtUiHandler::showVmbxQueryDialog select OK" )
         // asign OK KEY value
         aResult = KErrNone;
-        aNumber = lineEdit->text();
-        VMBLOGSTRING2( "VmbxQtUiHandler::showVmbxQueryDialog number = %s",
-            aNumber.utf16() )
+        aNumber = iQueryDialog->lineEdit()->text();
     } else {
         aResult = KErrCancel;
     }
-    delete val;
-    val = 0;
-    delete displayPopup;
-    displayPopup = 0;
+    delete iQueryDialog;
+    iQueryDialog = 0;
     VMBLOGSTRING2("VmbxQtUiHandler::showVmbxQueryDialog aResult = %d", aResult)
     VMBLOGSTRING("VmbxQtUiHandler::showVmbxQueryDialog Exit")
 }
@@ -148,7 +161,7 @@
 // ----------------------------------------------------------------------------
 //
 void VmbxQtUiHandler::showDefineSelectionDialog(
-    TVmbxType& aType, int& aResult)
+    TVmbxType &aType, int &aResult)
 {
     VMBLOGSTRING("VmbxQtUiHandler::showDefineSelectionDialog")
     HbDialog* defineListDialog = new HbDialog();
@@ -156,31 +169,33 @@
     defineListDialog->setTimeout(HbDialog::NoTimeout);
 
     defineListDialog->setModal(true);
-    // Set heading widget
-    defineListDialog->setHeadingWidget(new HbLabel(tr("Define number:")));
+    // Set heading widget,"Define number:"
+    defineListDialog->setHeadingWidget(new HbLabel(
+            hbTrId("txt_vmbx_title_select_mailbox")));
     // Create a define list 
     HbListWidget *list = new HbListWidget();
-    list->addItem(tr("Voice Mailbox"));
-    list->addItem(tr("Video Mailbox"));
+    //Voice Mailbox
+    list->addItem(hbTrId("txt_vmbx_list_voice_mailbox"));
+    //Video Mailbox
+    list->addItem(hbTrId("txt_vmbx_list_video_mailbox"));
     // Set content widget
     defineListDialog->setContentWidget(list);
 
-    HbAction* okAction = new HbAction(tr("Ok"));
-    // Sets the "OK"-action/button
-    defineListDialog->setPrimaryAction(okAction);
-    //  Sets the "Back"-action/button
-    HbAction* cancelAction =  new HbAction(tr("Cancel"));
+    //  Sets the "Cancel"-action/button
+    HbAction *cancelAction =  new HbAction(hbTrId(
+            "txt_common_button_cancel"));
     defineListDialog->setSecondaryAction(cancelAction);
 
-    connect(list, SIGNAL(activated(HbListWidgetItem*)), 
+    connect(list, SIGNAL(activated(HbListWidgetItem *)), 
         defineListDialog, SLOT(close()));
-    HbAction* result = defineListDialog->exec();
-
+    DialogWaiter waiter;
+    defineListDialog->open(&waiter, SLOT(done(HbAction *)));
+    HbAction *result = waiter.wait();
     if (cancelAction == result){
         aType = EVmbxNone;
         aResult = KErrCancel;
     } else {
-    // OK or single click items
+        // Select one item
         aResult = KErrNone;
         int currentItem = list->row(list->currentItem());
         VMBLOGSTRING2("VmbxQtUiHandler::showDefineSelectionDialog:\
@@ -198,75 +213,179 @@
     defineListDialog = 0;
     VMBLOGSTRING("VmbxQtUiHandler::showDefineSelectionDialog Exit")
 }
+
 // ----------------------------------------------------------------------------
-// VmbxQtUiHandler::ShowInformationNote
+// VmbxQtUiHandler::showCallSelectionDialog
+// (show call selection dialog).
+// ----------------------------------------------------------------------------
+//
+void VmbxQtUiHandler::showCallSelectionDialog(
+    const QList<CVoiceMailboxEntry *> entryList,
+    TVoiceMailboxParams &params, int &result )
+{
+    VMBLOGSTRING("VmbxQtUiHandler::showCallSelectionDialog")
+    int count = entryList.count();
+    VMBLOGSTRING("VmbxQtUiHandler::showCallSelectionDialog new before")
+    HbDialog* callListDialog = new HbDialog();
+    VMBLOGSTRING("VmbxQtUiHandler::showCallSelectionDialog new after")
+    callListDialog->setDismissPolicy(HbDialog::NoDismiss);
+    callListDialog->setTimeout(HbDialog::NoTimeout);
+    callListDialog->setModal(true);
+    // Set heading widget,"select mailbox"
+    callListDialog->setHeadingWidget(new HbLabel(
+               hbTrId("txt_vmbx_title_select_mailbox")));
+    // Create a call list 
+    HbListWidget *list = new HbListWidget();
+    // Set content widget
+    callListDialog->setContentWidget(list);
+
+    QList<TVoiceMailboxParams> paramsList;
+    TVoiceMailboxParams entryParams;
+    for (int i = 0; i < count; i++) {
+        TVmbxType vmbxType = entryList[i]->VoiceMailboxType();
+        entryParams.iType = vmbxType;
+        entryParams.iServiceId = entryList[i]->ServiceId();
+        paramsList.append(entryParams);
+        switch (vmbxType) {
+            case EVmbxVoice:
+                {
+                list->addItem(hbTrId("txt_vmbx_list_voice_mailbox"));
+                break;
+                }
+            case EVmbxVideo:
+                {
+                list->addItem(hbTrId("txt_vmbx_list_video_mailbox"));
+                break;
+                }
+            case EVmbxVoip:
+                {
+                // Get name
+                TPtrC vmbxName( KNullDesC );
+                int voipRes = entryList[i]->GetVmbxName(vmbxName);
+                VMBLOGSTRING2( "VmbxQtUiHandler::showCallSelectionDialogL\
+                    : voipRes=%I", voipRes );
+                if (KErrNone == voipRes) {
+                    QString voipName;
+                    if (vmbxName.Length() > 0) {
+                        voipName=QString::fromUtf16(
+                            vmbxName.Ptr(), vmbxName.Length());
+                        // add voip item
+                        list->addItem(voipName);
+                    }
+                }
+                break;
+                }
+            default:
+                break;
+        }
+    }
+    //  Sets the "Cancel"-action/button
+    HbAction *cancelAction = new HbAction(hbTrId(
+        "txt_common_button_cancel_toolbar"));
+    callListDialog->setSecondaryAction(cancelAction);
+
+    connect(list, SIGNAL(activated(HbListWidgetItem *)), 
+            callListDialog, SLOT(close()));
+    DialogWaiter waiter;
+    callListDialog->open(&waiter, SLOT(done(HbAction *)));
+    HbAction *action = waiter.wait();
+    if (cancelAction == action){
+        params.iType = EVmbxNone;
+        params.iServiceId = KVmbxServiceIdNone;
+        result = KErrCancel;
+    } else {
+        // Select one item
+        result = KErrNone;
+        int currentItem = list->row(list->currentItem());
+        VMBLOGSTRING2("VmbxQtUiHandler::showCallSelectionDialog:\
+            currentItem %d", currentItem)
+        params.iType = paramsList[currentItem].iType;
+        params.iServiceId = paramsList[currentItem].iServiceId;
+    }
+    VMBLOGSTRING2("VmbxQtUiHandler::showCallSelectionDialog: params.iType %d",
+        params.iType)
+    VMBLOGSTRING2("VmbxQtUiHandler::showCallSelectionDialog: result%d",
+        result)
+    delete callListDialog;
+    callListDialog = 0;
+    VMBLOGSTRING("VmbxQtUiHandler::showCallSelectionDialog Exit")
+}
+
+// ----------------------------------------------------------------------------
+// VmbxQtUiHandler::showInformationNote
 // (show information note).
 // ----------------------------------------------------------------------------
 //
-void VmbxQtUiHandler::showInformationNote(int aNoteType)
+void VmbxQtUiHandler::showInformationNote(const TVmbxNoteType aType)
 {
     VMBLOGSTRING("VmbxQtUiHandler::showInformationNote")
     QString noteText;
-    QString iconName;
-    VMBLOGSTRING2("VmbxQtUiHandler::~showInformationNote type =%d", aNoteType)
-    switch (aNoteType) {
+    VMBLOGSTRING2("VmbxQtUiHandler::showInformationNote type =%d", aType)
+    switch (aType) {
     case EInvalidNumber:
-        noteText = tr("Invalid phone number.");
-        iconName = "note_error";
+        // Need to comfirm with ui designer
+        noteText = hbTrId("Invalid phone number.");
+        break;
+    case ENotAllowUserEditing:
+        //User not allow to edit.
+        noteText = hbTrId("Number not provisioned");
         break;
     case ESavedToPhoneMemory:
-        noteText = tr("Voice mailbox number saved to Phone memory.");
-        iconName = "note_info";
-        break;
-    case ESavedToSimMemory:
-        noteText = tr("Voice mailbox number saved to Sim card.");
-        iconName = "note_info";
+    case ESavedToSimMemory:	
+        //Voice mailbox number saved to Phone memory.
+        noteText = hbTrId("txt_vmbx_dpopinfo_voice_mailbox_number_saved");
         break;
     case EVideoNumberSaved:
-        noteText = tr("Video call mailbox saved.");
-        iconName = "note_info";
+        //Video call mailbox saved.
+        noteText = hbTrId("txt_vmbx_dpopinfo_video_mailbox_number_saved");
+        break;
+    case EDefineVoiceNumber:
+        //Define voice mailbox.
+        noteText = hbTrId("txt_vmbx_dpopinfo_define_voice_mailbox_number");
+        break;
+    case EDefineVideoNumber:
+        //Define video mailbox.
+        noteText = hbTrId("txt_vmbx_dpopinfo_define_video_mailbox_number");
         break;
     default:
         VMBLOGSTRING("VmbxQtUiHandler::ShowInformationNote default")
         break;
     }
-
-    HbMessageBox *msgBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
+    HbMessageBox *msgBox = 0;
+    if (EInvalidNumber == aType) {
+        msgBox = new HbMessageBox(HbMessageBox::MessageTypeWarning);   
+    } else {
+        msgBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
+    }
     msgBox->setText(noteText);
-    msgBox->setIcon(HbIcon(iconName));
-    msgBox->exec();
+    msgBox->removeAction(msgBox->primaryAction());
+    DialogWaiter waiter;
+    msgBox->open(&waiter, SLOT(done(HbAction *)));
+    waiter.wait();
     delete msgBox;
-    VMBLOGSTRING("VmbxQtUiHandler::~ShowInformationNote Exit")
-    
+    msgBox = 0;
+    VMBLOGSTRING("VmbxQtUiHandler::showInformationNote Exit")
 }
 
 // ----------------------------------------------------------------------------
-// VmbxQtUiHandler::ShowSaveEmptyNote
+// VmbxQtUiHandler::updatePrimaryAction
 // (show information note).
 // ----------------------------------------------------------------------------
 //
-void VmbxQtUiHandler::showSaveEmptyNote(const TVmbxType& aType)
+void VmbxQtUiHandler::updatePrimaryAction(const QString &aInput)
 {
-    VMBLOGSTRING("VmbxQtUiHandler::~showSaveEmptyNote")
-    QString noteText;
-    VMBLOGSTRING2("VmbxQtUiHandler::~showSaveEmptyNote type = %d", aType)
-    switch (aType) {
-    case EVmbxVoice:
-        noteText = tr("Voice mailbox number not defined.");
-        break;
-    case EVmbxVideo:
-        noteText = tr("Video mailbox number not defined.");
-        break;
-    default:
-        VMBLOGSTRING("VmbxQtUiHandler::ShowSaveEmptyNote default")
-        break;
-    }
-    HbMessageBox *msgBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
-    msgBox->setText(noteText);
-    msgBox->setIcon(HbIcon("note_error"));
-    msgBox->exec();
-    delete msgBox;
-    VMBLOGSTRING("VmbxQtUiHandler::~ShowSaveEmptyNote Exit")
+    HbAction *ok = iQueryDialog->primaryAction();
+    if (aInput.isEmpty() || aInput.contains(QRegExp("\\d\\d\\d"))){
+        if (!ok->isEnabled()){
+            ok->setEnabled(true);
+            VMBLOGSTRING("VmbxQtUiHandler::updatePrimaryAction enable OK")
+        }
+    }else{
+        if (ok->isEnabled()){
+            ok->setEnabled(false);
+            VMBLOGSTRING("VmbxQtUiHandler::updatePrimaryAction disable OK")  
+        }
+    }  
 }
 
 //End of file
--- a/vmbx/vmbxengine/src/vmbxuihandler.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/src/vmbxuihandler.cpp	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -18,6 +18,8 @@
 
 // qt
 #include <QString>
+#include <cvoicemailbox.h>
+#include <cvoicemailboxentry.h>
 
 #include "vmbxqtuihandler.h"
 #include "voicemailboxdefsinternal.h"
@@ -42,12 +44,18 @@
     return handler;
 }
 
+// ----------------------------------------------------------------------------
+// CVmbxUiHandler::ConstructL
+// (Constructor).
+// ----------------------------------------------------------------------------
+//
 void CVmbxUiHandler::ConstructL()
 {
     VMBLOGSTRING( "CVmbxUiHandler::ConstructL" )
     iHandler = new VmbxQtUiHandler;
     VMBLOGSTRING( "CVmbxUiHandler::ConstructL Exit" )
 }
+
 // ----------------------------------------------------------------------------
 // CVmbxUiHandler::CVmbxUiHandler
 // (Constructor).
@@ -77,7 +85,6 @@
 // ----------------------------------------------------------------------------
 //
 void CVmbxUiHandler::ShowVmbxQueryDialog(const TVmbxType& aType,
-                          const TVmbxQueryMode& aMode,
                           TDes& aNumber, TInt& aResult)
 {
     VMBLOGSTRING( "CVmbxUiHandler::ShowVmbxQueryDialog" )
@@ -86,7 +93,8 @@
         {
         vmbxNumber=QString::fromUtf16(aNumber.Ptr(), aNumber.Length());
         }
-    iHandler->showVmbxQueryDialog( aType, aMode, vmbxNumber, aResult );
+    QT_TRYCATCH_LEAVING(
+        iHandler->showVmbxQueryDialog( aType, vmbxNumber, aResult ));
     aNumber = vmbxNumber.utf16();
     VMBLOGSTRING2( "CVmbxUiHandler::ShowVmbxQueryDialog:\
         aNumber = %S", &aNumber );
@@ -103,7 +111,7 @@
        TInt& aResult )
 {
     VMBLOGSTRING( "CVmbxUiHandler::ShowDefineSelectionDialog" )
-    iHandler->showDefineSelectionDialog( aType, aResult );
+    QT_TRYCATCH_LEAVING(iHandler->showDefineSelectionDialog( aType, aResult ));
     VMBLOGSTRING2( "CVmbxUiHandler::ShowDefineSelectionDialog:\
         aType = %d", aType );
     VMBLOGSTRING2( "CVmbxUiHandler::ShowDefineSelectionDialog:\
@@ -111,72 +119,56 @@
     VMBLOGSTRING( "CVmbxUiHandler::ShowDefineSelectionDialog Exit" )
 
 }
+
 // ----------------------------------------------------------------------------
-// CVmbxUiHandler::ShowSaveToPhoneNote
+// CVmbxUiHandler::ShowCallSelectionDialogL
+// (Show query dialog).
 // ----------------------------------------------------------------------------
 //
-void CVmbxUiHandler::ShowSaveToPhoneNote()
+void CVmbxUiHandler::ShowCallSelectionDialogL(
+            const RPointerArray<CVoiceMailboxEntry>& aArray,
+            TVoiceMailboxParams& aParams, TInt& aResult )
 {
-    VMBLOGSTRING( "CVmbxUiHandler::ShowSaveToPhoneNote" )
-    iHandler->showInformationNote( ESavedToPhoneMemory );
-    VMBLOGSTRING( "CVmbxUiHandler::ShowSaveToPhoneNote Exit" )
+    VMBLOGSTRING( "CVmbxUiHandler::ShowCallSelectionDialogL" )
+    TInt count = aArray.Count();
+    VMBLOGSTRING2("CVmbxUiHandler::showCallSelectionDialogL count = %d", count)
+    if (count < 1) 
+        {
+        VMBLOGSTRING("CVmbxUiHandler::showCallSelectionDialogL leave<=")
+        User::Leave(KErrArgument);
+        }
+    QList<CVoiceMailboxEntry* > entryList;
+    for ( int i = 0; i < aArray.Count(); i++ ) 
+        {
+        entryList.append(aArray[i]);
+        }
+    QT_TRYCATCH_LEAVING(
+        iHandler->showCallSelectionDialog( entryList, aParams, aResult ));
+    VMBLOGSTRING2( "CVmbxUiHandler::ShowCallSelectionDialogL:\
+        aResult = %d", aResult );
+    VMBLOGSTRING( "CVmbxUiHandler::ShowCallSelectionDialogL" )
 }
 
 // ----------------------------------------------------------------------------
-// CVmbxUiHandler::ShowSaveToSimNote
-// ----------------------------------------------------------------------------
-//
-void CVmbxUiHandler::ShowSaveToSimNote()
-{
-    VMBLOGSTRING( "CVmbxUiHandler::ShowSaveToSimNote" )
-    iHandler->showInformationNote( ESavedToSimMemory );
-    VMBLOGSTRING( "CVmbxUiHandler::ShowSaveToSimNote Exit" )
-}
-
-// ----------------------------------------------------------------------------
-// CVmbxUiHandler::ShowVideoSavedNote
+// CVmbxUiHandler::ShowInformationdNote
 // ----------------------------------------------------------------------------
 //
-void CVmbxUiHandler::ShowVideoSavedNote()
+void CVmbxUiHandler::ShowInformationdNoteL(const TVmbxNoteType aType)
 {
-    VMBLOGSTRING( "CVmbxUiHandler::ShowVideoSavedNote" )
-    iHandler->showInformationNote( EVideoNumberSaved );
-    VMBLOGSTRING( "CVmbxUiHandler::ShowVideoSavedNote Exit" )
-}
-
-// ----------------------------------------------------------------------------
-// CVmbxUiHandler::ShowInvalidNumberNote
-// ----------------------------------------------------------------------------
-//
-
-void CVmbxUiHandler::ShowInvalidNumberNote()
-{
-    VMBLOGSTRING( "CVmbxUiHandler::ShowInvalidNumberNote" )
-    iHandler->showInformationNote( EInvalidNumber );
-    VMBLOGSTRING( "CVmbxUiHandler::ShowInvalidNumberNote Exit" )
+    VMBLOGSTRING( "CVmbxUiHandler::ShowInformationdNoteL" )
+    QT_TRYCATCH_LEAVING(iHandler->showInformationNote(aType));
+    VMBLOGSTRING( "CVmbxUiHandler::ShowInformationdNoteL Exit" )
 }
 
 // ----------------------------------------------------------------------------
 // CVmbxUiHandler::ShowInvalidWarningNote
 // ----------------------------------------------------------------------------
 //
-
-void CVmbxUiHandler::ShowInvalidWarningNote()
+void CVmbxUiHandler::ShowInvalidWarningNoteL()
 {
-    VMBLOGSTRING( "CVmbxUiHandler::ShowInvalidWarningNote" )
-    iHandler->showInformationNote( EInvalidNumber );
-    VMBLOGSTRING( "CVmbxUiHandler::ShowInvalidWarningNote Exit" )
-}
-
-// ----------------------------------------------------------------------------
-// CVmbxUiHandler::ShowSaveEmptyNote
-// ----------------------------------------------------------------------------
-//
-void CVmbxUiHandler::ShowSaveEmptyNote( const TVmbxType& aType )
-{
-    VMBLOGSTRING( "CVmbxUiHandler::ShowSaveEmptyNote" )
-    iHandler->showSaveEmptyNote( aType );
-    VMBLOGSTRING( "CVmbxUiHandler::ShowSaveEmptyNote Exit" )
+    VMBLOGSTRING( "CVmbxUiHandler::ShowInvalidWarningNoteL" )
+    QT_TRYCATCH_LEAVING(iHandler->showInformationNote( EInvalidNumber ));
+    VMBLOGSTRING( "CVmbxUiHandler::ShowInvalidWarningNoteL Exit" )
 }
 
 //End of file
--- a/vmbx/vmbxengine/src/vmbxuiutilities.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/src/vmbxuiutilities.cpp	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -134,7 +134,7 @@
 // ---------------------------------------------------------------------------
 //
 void CVmbxUiUtilities::ShowQueryDialogL( const TVmbxType& aType,
-                                         const TVmbxQueryMode& aMode,
+                                         const TVmbxQueryMode& /*aMode*/,
                                          TDes& aNumber, TInt& aResult )
     {
     VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowQueryDialogL =>" );
@@ -149,84 +149,35 @@
     aNumber = %S", &aNumber );
     // to show dialog via qt part
     VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowQueryDialogL to show qt" );
-    iUiHandler->ShowVmbxQueryDialog( aType, aMode, aNumber, aResult );
+    iUiHandler->ShowVmbxQueryDialog( aType, aNumber, aResult );
     VMBLOGSTRING2( "VMBX: CVmbxUiUtilities::ShowQueryDialogL: out\
     aNumber = %S", &aNumber );
     VMBLOGSTRING2( "VMBX: CVmbxUiUtilities::ShowQueryDialogL: aResult=%I <=",
      aResult );
     }
 
-
-// ---------------------------------------------------------------------------
-// VmbxUtilities::ShowSaveEmptyNoteL
-// Show dialog when save empty data
-// ---------------------------------------------------------------------------
-//
-void CVmbxUiUtilities::ShowSaveEmptyNoteL( const TVmbxType& aType )
-    {
-    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowSaveEmptyNoteL =>" );
-    if ( EVmbxVoice != aType && EVmbxVideo != aType )
-        {
-        User::Leave( KErrNotSupported );
-        }
-    iUiHandler->ShowSaveEmptyNote( aType );
-    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowSaveEmptyNoteL <=" );
-    }
-
 // ---------------------------------------------------------------------------
 // VmbxUtilities::ShowInvalidWarningDialogL
-// Check the characters
+//
 // ---------------------------------------------------------------------------
 //
 void CVmbxUiUtilities::ShowInvalidWarningDialogL()
     {
     VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowInvalidWarningDialogL =>" );
-    //TODO comment out the following code to avoid crash, to be tested
-    //and uncommented
-    //iUiHandler->ShowInvalidWarningNote();
+    iUiHandler->ShowInformationdNoteL( EInvalidNumber );
     VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowInvalidWarningDialogL <=" );
     }
 
 // ---------------------------------------------------------------------------
-// VmbxUtilities::ShowSaveToPhoneNote
-// Check the characters
-// ---------------------------------------------------------------------------
+// VmbxUtilities::ShowInformationdNote
 //
-void CVmbxUiUtilities::ShowSaveToPhoneNote()
-    {
-    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowSaveToPhoneConfirmDialog =>" );
-    //TODO comment out the following code to avoid crash, to be tested
-    //and uncommented
-    //iUiHandler->ShowSaveToPhoneNote();
-    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowSaveToPhoneConfirmDialog <=" );
-    }
-
-// ---------------------------------------------------------------------------
-// VmbxUtilities::ShowSaveToSimConfirmDialog
-// Check the characters
 // ---------------------------------------------------------------------------
 //
-void CVmbxUiUtilities::ShowSaveToSimNote()
+void CVmbxUiUtilities::ShowInformationdNoteL(const TVmbxNoteType aType )
     {
-    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowSaveToSimNote =>" );
-    //TODO comment out the following code to avoid crash, to be tested
-    //and uncommented
-    //iUiHandler->ShowSaveToSimNote();
-    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowSaveToSimNote <=" );
-    }
-
-// ---------------------------------------------------------------------------
-// VmbxUtilities::ShowVideoSaveConfirmDialog
-// Check the characters
-// ---------------------------------------------------------------------------
-//
-void CVmbxUiUtilities::ShowVideoSavedNote()
-    {
-    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowVideoSavedNote =>" );
-    //TODO comment out the following code to avoid crash, to be tested
-    //and uncommented
-    //iUiHandler->ShowVideoSavedNote();
-    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowVideoSavedNote <=" );
+    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowInformationdNoteL =>" );
+    iUiHandler->ShowInformationdNoteL( aType );
+    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowInformationdNoteL <=" );
     }
 
 // ---------------------------------------------------------------------------
@@ -234,7 +185,7 @@
 // Show define number in selection list
 // ---------------------------------------------------------------------------
 //
-void CVmbxUiUtilities::ShowDefineSelectionDialogL( TVmbxType& aType,
+void CVmbxUiUtilities::ShowDefineSelectionDialog( TVmbxType& aType,
                                                          TInt& aResult )
     {
     VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowDefineSelectionDialogL =>" );
@@ -245,7 +196,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// VmbxUtilities::ShowCallSelectionDialog
+// VmbxUtilities::ShowCallSelectionDialogL
 // Show call number in selection list
 // ---------------------------------------------------------------------------
 //
@@ -254,11 +205,13 @@
                     TVoiceMailboxParams& aParams,
                     TInt& aResult )
     {
-    VMBLOGSTRING(
-    "VMBX: CVmbxUiUtilities::ShowCallSelectionDialog EMPTY IMPLEMENTATION! =>"
-    );
-    // TODO: not supported yet, to be implemented.
-    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowCallSelectionDialog <=" );
+    VMBLOGSTRING("VMBX: CVmbxUiUtilities::ShowCallSelectionDialogL  =>");
+    if ( aArray.Count() < 1 )
+        {
+        User::Leave(KErrArgument);
+        }
+    iUiHandler->ShowCallSelectionDialogL( aArray, aParams, aResult );
+    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowCallSelectionDialogL <=" );
     }
 
 // ---------------------------------------------------------------------------
@@ -286,16 +239,15 @@
 */
 
 // --------------------------------------------------------------------------
-// CVmbxUiUtilities::ShowErrorDialogL
+// CVmbxUiUtilities::ShowNotAllowedEditingDialog
 // --------------------------------------------------------------------------
 //
-void CVmbxUiUtilities::ShowErrorDialogL()
+void CVmbxUiUtilities::ShowNotAllowedEditingDialogL()
     {
-    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowErrorDialogL =>" );
-    //TODO comment out the following code to avoid crash, to be tested
-    //and uncommented
-    iUiHandler->ShowInvalidNumberNote();// temporary dialog
-    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowErrorDialogL <=" );
+    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowNotAllowedEditingDialogL =>" );
+    // Information user can't edit.
+    iUiHandler->ShowInformationdNoteL( ENotAllowUserEditing );
+    VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowNotAllowedEditingDialogL <=" );
     }
 
 // -----------------------------------------------------------------------------
@@ -304,11 +256,12 @@
 // -----------------------------------------------------------------------------
 //
 void CVmbxUiUtilities::FetchNumberFromPhonebook2L( 
-                                          TDes& aPhoneNumber )
+                                          TDes& /*aPhoneNumber*/ )
     {
     VMBLOGSTRING( "VMBX: CVmbxUiUtilities::FetchNumberFromPhonebook2L =>" );
     /* TODO: Later remove this or replace with some Qt Phonebook API
         */
     VMBLOGSTRING( "VMBX: CVmbxUiUtilities::FetchNumberFromPhonebook2L <=" );
     }
+
 // End of file
--- a/vmbx/vmbxengine/src/vmbxutilities.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/src/vmbxutilities.cpp	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -24,15 +24,13 @@
 #include "vmbxcenrephandler.h"
 #include "vmbxemergencycall.h"
 #include "vmbxutilities.h"
+#include "voicemailboxdefsinternal.h"
 
 // CONSTANTS
 const TInt KVmbxPhoneNumMinLength = 2;
 const TInt KVmbxPhoneNumMaxLength = 40;
-const TInt KVmbxPhoneCharMaxLength = 48;
 
 _LIT( KAllowedTelNumChars, "0123456789" );
-_LIT( KAllowedDtmfChars, "0123456789+pwPW" );
-_LIT( KAllowedSSChars, "*+0123456789#" );
 
 // ============================ MEMBER FUNCTIONS =============================
 
@@ -54,22 +52,19 @@
         lexer.SkipSpace();
         TChar current = lexer.Peek();
         // If no SS code then consider this is valid and return true.    
-        if ( '#' == current || '*' == current )
+        if ( '*' == current )
             {
             // check whether accord ss regulation,
-            result = ValidateSsNum( lexer );
+            lexer.Inc(); // Skip first *
             }
-        else
-            {
-            result = ValidateTelNum( lexer );
-            // If zero length then consider as valid and return value of 
-            // result, If not the end of the string, check if it's DTMF numbers
-            if ( !lexer.Eos() && result )
-                {
-                result = ValdateDtmfPart( lexer );
-                }
-            }
+    result = ValidateTelNum( lexer );
+    // If zero length then consider as valid and return value of 
+    // result, If not the end of the string, check if it's DTMF numbers
+    if ( !lexer.Eos() && result )
+        {
+        result = ValdateDtmfPart( lexer );
         }
+    }
     VMBLOGSTRING2( "VMBX: VmbxUtilities::IsValidPhoneNumber: result = %d<=",
         result );
     return result;
@@ -169,61 +164,6 @@
     }
 
 // -----------------------------------------------------------------------------
-// VmbxUtilities::ValidateSSfix
-// Skips over SS code if it exists.
-// -----------------------------------------------------------------------------
-//  
-TBool VmbxUtilities::ValidateSsNum( TLex& aLexer )
-    {
-    VMBLOGSTRING( "VMBX: VmbxUtilities::ValidateSsNum: =>" );
-    //The procedure always starts with *, #, **, ## or *# and is finished by #.
-    // Each part within the procedure is separated by *.
-
-    TBool result( EFalse );
-    // Get and skip the first '#' or '*' separator
-    TChar current = aLexer.Get();
-
-    current = aLexer.Peek();
-
-    if ( '#' == current || '*' == current )
-        {
-        aLexer.Inc(); // Skip the second '#' or '*' separator
-        }
-    // Define another string which aready skip the prefix '*' or
-    // '#', the sring to judge the string whether end of  '#' and
-    // valid
-    TLex nextLexer( aLexer );
-    TChar nextChar = nextLexer.Peek();
-    TBool invalidCharFound( EFalse );
-    while ( !nextLexer.Eos() && !invalidCharFound )
-        {
-        nextChar = nextLexer.Get();
-        VMBLOGSTRING2( "VMBX: VmbxUtilities::ValidateTelNum:\
-            nextChar %S", &nextChar );
-        // Check the string valid or invalid for SS string
-        if ( KErrNotFound == KAllowedSSChars().Locate( nextChar ) )
-            {
-            invalidCharFound = ETrue;
-            }
-        }
-
-    // Check if the string end of '#' and check if it's validate ss code.
-    if ( nextLexer.Eos() && ( '#' == nextChar ) && !invalidCharFound )
-        {
-        result = ETrue;
-        if ( result && !aLexer.Eos() )
-            {
-            // It already skip prefix and 
-            // Check SC(Service Code) length,it should be more than 2 digits
-            result = ValidateTelNum( aLexer );
-            }
-        }
-    VMBLOGSTRING2( "VMBX: VmbxUtilities::ValidateSsNum: result = %d<=",
-        result );
-    return result;
-    }
-
-// -----------------------------------------------------------------------------
 // VmbxUtilities::ValidateTelNum
 // Parses string until end or invalid tel number character is found.
 // Check number length.
@@ -261,14 +201,13 @@
 
     VMBLOGSTRING2( "VMBX: VmbxUtilities::ValidateTelNum:\
         telNumDigits %d", telNumDigits );
-
-    if ( KVmbxPhoneNumMinLength > telNumDigits 
-        || KVmbxPhoneNumMaxLength < telNumDigits
-        || invalidCharFound )
+    // digitlength <3 or digit length>40, invalid telnumber
+    if ( KVmbxPhoneNumMinLength >= telNumDigits 
+        || KVmbxPhoneNumMaxLength < telNumDigits 
+        )
         {
         result = EFalse;
         }
-
     VMBLOGSTRING2( "VMBX: VmbxUtilities::ValidateTelNum:\
          result %d<=", result );
     return result;
@@ -287,44 +226,17 @@
     // the second part of the string a DTMF special character (p, w or +),
     // the last third part is an actual DTMF tone string, which is sent to the
     // remote end.
-    TBool result( ETrue );
-    TLex lexer( aLexer );
-    TInt telNumDigitsBeforeDtmf( 0 );
-    TBool isDtmfNumberDiscover( EFalse );
-    TBool invalidCharFound( EFalse );
+    TBool result( EFalse );
     // check the second part of the string
-    while ( !lexer.Eos() && !invalidCharFound )
+    const TChar nextChar = aLexer.Peek();
+    // Check DTMF number discover or not
+    if ( 'p' == nextChar || 'P' == nextChar 
+        || 'w'== nextChar || 'W' == nextChar || '+' == nextChar )
         {
-        const TChar nextChar = aLexer.Peek();
-        // Check valid DTMF chars
-        if ( KErrNotFound == KAllowedDtmfChars().Locate( lexer.Get() ) )
-            {
-            invalidCharFound = ETrue;
-            }
-        else 
-            {
-            // Check DTMF number discover or not
-            if ( 'p' == nextChar || 'P'== nextChar 
-                || 'w'== nextChar || 'w'== nextChar )
-                {
-                isDtmfNumberDiscover = ETrue;
-                }
-            // Telnumber count without '+' before 'p' or 'w'
-            if ( '+' != aLexer.Peek() && !isDtmfNumberDiscover )
-                { 
-                telNumDigitsBeforeDtmf++;
-                }
-             aLexer.Inc();
-            }
-         VMBLOGSTRING2( "VMBX: VmbxUtilities::ValdateDtmfPart:\
-         telNumDigitsBeforeDtmf %d", telNumDigitsBeforeDtmf );
-        }
-    
-    if ( KVmbxPhoneNumMinLength > telNumDigitsBeforeDtmf 
-        || KVmbxPhoneNumMaxLength < telNumDigitsBeforeDtmf 
-        || invalidCharFound )
-        {
-        result = EFalse;
+        // After DTMF char, is tone string, there is no specfic rule about tone string,
+        // so just do a simple check.
+        result = ETrue;
+        VMBLOGSTRING( "VMBX: VmbxUtilities::ValdateDtmfPart DtmfNumberDiscover" );
         }
     VMBLOGSTRING2( "VMBX: VmbxUtilities::ValdateDtmfPart: result = %d<=",
         result );
--- a/vmbx/vmbxengine/src/vmbxvoipengine.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/src/vmbxvoipengine.cpp	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -166,14 +166,11 @@
 // ----------------------------------------------------------------------------
 //
 TBool CVmbxVoIpEngine::CheckConfiguration( 
-        const TVoiceMailboxParams& /*aParams*/, const TInt aFlags )
+        const TVoiceMailboxParams& aParams, const TInt aFlags )
     {
     VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::CheckConfiguration: =>" );
-    TBool result( ETrue );
-    if ( EVmbxChangeNbrNotAllowedOnUi & aFlags )
-        {
-        result = EFalse;
-        }
+    TBool result( EFalse );
+    result = CVmbxEngineBase::CheckConfiguration(aParams, aFlags);
     VMBLOGSTRING2( "VMBX: CVmbxVoIpEngine::CheckConfiguration: result%I <=",
      result );
     return result;
--- a/vmbx/vmbxengine/src/vmspshandler.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/src/vmspshandler.cpp	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2009 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"
@@ -407,6 +407,8 @@
 //
 void CVmSPSHandler::HandleError( TInt aError )
     {
+    // Avoid warning
+    aError = aError;
     VMBLOGSTRING2( "VMBX: CVmSPSHandler::HandleError: aError %d", aError );
     }
 
--- a/vmbx/vmbxengine/src/voicemailboximpl.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/src/voicemailboximpl.cpp	Fri May 14 16:24:46 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 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"
@@ -30,6 +30,11 @@
 #include "vmbxcenrephandler.h"
 #include "voicemailboximpl.h"
 
+// phone application uid
+//const TInt KPhoneApplicationUid          = 0x100058B3;
+// Temp! using contropannel vmbxcp plugin uid for testing
+const TInt KPhoneApplicationUid          = 0x20025FD9;
+
 // ============================ MEMBER FUNCTIONS =============================
 
 // ---------------------------------------------------------------------------
@@ -395,7 +400,7 @@
     CVmbxEngineBase* vmbxBox( NULL );
     iVmbxFactory->CreateEngineL( vmbxBox, aEntry.VoiceMailboxType() );
     CleanupStack::PushL( vmbxBox );
-    if ( vmbxBox->CheckConfiguration( params, EVmbxChangeNbrNotAllowedOnUi ) )
+    if ( vmbxBox->CheckConfiguration( params, EVmbxChangeNbrAllowedOnUi ) )
         {
         vmbxBox->SaveL( aEntry );
         }
@@ -419,7 +424,7 @@
     CVmbxEngineBase* vmbxBox( NULL );
     iVmbxFactory->CreateEngineL( vmbxBox, aParams.iType );
     CleanupStack::PushL( vmbxBox );
-    if ( vmbxBox->CheckConfiguration( aParams, EVmbxChangeNbrNotAllowedOnUi ) )
+    if ( vmbxBox->CheckConfiguration( aParams, EVmbxChangeNbrAllowedOnUi ) )
         {
         CVoiceMailboxEntry* entry = CVoiceMailboxEntry::NewLC();
         entry->SetVoiceMailboxType( aParams.iType );
@@ -430,8 +435,7 @@
         }
     else
         {
-        // show error note
-        iUiUtilities->ShowErrorDialogL();
+        CheckNumberProvisionedL( aParams );
         }
     CleanupStack::PopAndDestroy( vmbxBox );
     VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryNewEntryL <=" );
@@ -449,7 +453,7 @@
     CVmbxEngineBase* vmbxBox( NULL );
     iVmbxFactory->CreateEngineL( vmbxBox, aParams.iType );
     CleanupStack::PushL( vmbxBox );
-    if ( vmbxBox->CheckConfiguration( aParams, EVmbxChangeNbrNotAllowedOnUi ) )
+    if ( vmbxBox->CheckConfiguration( aParams, EVmbxChangeNbrAllowedOnUi ) )
         {
         CVoiceMailboxEntry* entry( NULL );
         GetStoredEntryL( aParams, entry );
@@ -460,8 +464,7 @@
         }
     else
         {
-        // show error note
-        iUiUtilities->ShowErrorDialogL();
+        CheckNumberProvisionedL( aParams );
         }
     CleanupStack::PopAndDestroy( vmbxBox );
     VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryChangeEntryL <=" );
@@ -541,7 +544,7 @@
         if ( VmbxUtilities::VideoSupported() )
             {
             // query to be defined type
-            iUiUtilities->ShowDefineSelectionDialogL( aParams.iType, result );
+            iUiUtilities->ShowDefineSelectionDialog( aParams.iType, result );
             // if result is KErrNone(but result should be also KErrNotFound ),
             // it means user have seclected the defined type;
             // else user cancel to select the type, so should return result value
@@ -556,7 +559,7 @@
             }
         }
 
-    CleanupStack::PopAndDestroy(); //item 
+    CleanupStack::PopAndDestroy( &array ); //item 
     VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL: result%I",
     result );
     User::LeaveIfError( result );
@@ -858,4 +861,44 @@
     return *iCenRepHandler;
     }
 
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::CheckNumberProvisionedL
+// 
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::CheckNumberProvisionedL( 
+        const TVoiceMailboxParams& aParams )
+    {
+    VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::CheckNumberProvisionedL =>" );
+    if ( ( EVmbxVoice == aParams.iType 
+            && EVmbxSimMemory == iCenRepHandler->StoreType() )
+         || ( EVmbxVideo == aParams.iType ) )
+        {
+        // get current active process
+        RProcess curProcess;
+        TInt curProcessId( curProcess.SecureId().iId );
+        VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::CheckNumberProvisionedL \
+            Get cur process id: curProcessId = %I", curProcessId );
+        // User press 1+send key or long press 1
+        if ( KPhoneApplicationUid == curProcessId )
+            {
+            RPointerArray<CVoiceMailboxEntry> array;
+            TCleanupItem item( CleanupRPointerArray, &array );
+            CleanupStack::PushL( item );
+            GetDefinedEntriesL( array );
+            // Only operator has the possibility to configure device, 
+            // user is not allowed to edit the voice mail numbers
+            if ( array.Count() < 1 )
+                {
+                // show not allowed user editing dialog
+                iUiUtilities->ShowNotAllowedEditingDialogL();
+                }
+            CleanupStack::PopAndDestroy( &array ); //item 
+            } 
+        }
+    // User don't have access to edit cs voice or video number
+    User::Leave( KErrAccessDenied );
+    VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::CheckNumberProvisionedL <=" );
+    }
+
 // End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/inc/ut_pbkstore.h	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#ifndef UT_PBKSTORE_H
+#define UT_PBKSTORE_H
+
+#include <QObject>
+
+class CVmbxPbkStore;
+
+class Ut_PbkStore : public QObject
+{
+    Q_OBJECT
+    
+public:
+    Ut_PbkStore();
+    virtual ~Ut_PbkStore();
+    
+private slots:
+    void testCreateAndDelete();
+    void testIsWritable();
+    void testPhoneBookType();
+    // Can not handle AO in Current UT desing
+    //void testWrite(); 
+    void testPhonebookStore();
+    //void testGetL();
+    
+private:
+    void createPbk();
+    void deletePbk();
+    
+private:
+    CVmbxPbkStore *mPbk;
+};
+
+#endif // UT_PBKSTORE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/inc/ut_simhandler.h	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#ifndef UT_SIMHANDLER_H
+#define UT_SIMHANDLER_H
+
+#include <QObject>
+
+class CVmbxSimHandler;
+
+class Ut_SimHandler : public QObject
+{
+    Q_OBJECT
+    
+public:
+    Ut_SimHandler();
+    virtual ~Ut_SimHandler();
+    
+private slots:
+    void testCreateAndDelete();
+    //void testGetL();
+    //void testSave();
+    void testIsWritable();
+    void testNotifyStoreEvent();        
+    void testPhoneBookType();
+    void testCancelAsyncRequest();
+    
+private:
+    void createSim();
+    void deleteSim();
+    
+private:
+    CVmbxSimHandler *mSim;
+};
+
+#endif // UT_SIMHANDLER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/inc/ut_vmbxengine.h	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 20 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Unit test class for CVmbxPbkStore
+*
+*/
+
+#ifndef UT_VMBXENGINE_H
+#define UT_VMBXENGINE_H
+
+#include <QObject>
+
+class CVoiceMailbox;
+class CVoiceMailboxEntry;
+
+class Ut_VmbxEngine : public QObject
+{
+    Q_OBJECT
+
+public:
+    Ut_VmbxEngine();
+    virtual ~Ut_VmbxEngine();
+
+private slots:
+
+    // Test New and Delete Api
+    void testVmbxApi();
+    void testEntryApi();
+    
+    // CVoiceMailbox test code
+    void testGetStoredEntry();
+    void testSaveEntry();
+    void testQueryNewEntry();
+    void testQueryChangeEntry();
+    void testQueryVmbxType();
+    //void testNotifyVmbxNumberChangeL();
+    //void NotifyVmbxNumberChangeCancel();
+    void testCheckConfiguration();
+    void testGetServiceIds();
+    void testSaveProvisionedEntry();
+    
+    // CVoiceMailboxEntry test code
+    void testType();
+    void testName();
+    void testServiceId();
+    void testLineType();
+    void testNumber();
+    void testBrandId();
+    void testUsingMemoryLocation();
+    void testReset();
+   
+private:
+    // create and delete Api
+    void createVmbxApi();
+    void createEntryApi();
+    void deleteVmbxApi();
+    void deleteEntryApi();
+private:
+    CVoiceMailbox *mVmbx;
+    CVoiceMailboxEntry *mEntry;
+};
+
+#endif // UT_VMBXENGINE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/cenrep_mock.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 <QtTest/QtTest>
+#include <centralrepository.h>
+#include "voicemailboxdomaincrkeys.h"
+#include "voicemailboxprivatecrkeys.h"
+
+_LIT(KStringValue, "123");
+
+// TODO: Add a new class named Ut_Utility to config all CR key
+// to simulate 3 different images
+CRepository* CRepository::NewL(TUid /*aRepositoryUid*/)
+{
+    CRepository *self = new (ELeave) CRepository();
+    return self;
+}
+
+CRepository::~CRepository()
+{
+    
+}
+
+TInt CRepository::Get(TUint32 aKey, TInt& aValue)
+{
+    if (KVideoMbxSupport == aKey){
+        aValue = 1;
+        qDebug("KVideoMbxSupport 1");
+    } else if (KVmbxNoSimWriting == aKey){
+        aValue = 0;
+        qDebug("KVmbxNoSimWriting 0");
+    } else if (KVmbxUiCaps == aKey){
+        aValue = 0;
+        qDebug("KVmbxUiCaps 1");
+    } else {
+        aValue = 0;
+        qDebug("default 0");
+    }
+    
+    return KErrNone;
+}
+TInt CRepository::Set(TUint32 /*aKey*/, TInt /*aValue*/)
+{
+    return KErrNone;
+}
+
+TInt CRepository::Get(TUint32 /*aKey*/, TDes16& aValue)
+{
+    aValue.Append(KStringValue);
+    return KErrNone;
+}
+
+TInt CRepository::Set(TUint32 /*aKey*/, const TDesC16& /*aValue*/)
+{
+    return KErrNone;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/etel_mock.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,196 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 <etelmm.h>
+#include <etel.h>
+#include <e32std.h>
+#include <QtTest/QtTest>
+
+RPhone::RPhone()
+{
+}
+
+void RPhone::ConstructL()
+{   
+}
+
+TInt RPhone::Open(RTelServer& /*aSession*/,const TDesC& /*aName*/)
+{
+    return KErrNone;
+}
+
+void RPhone::Close()
+{   
+}
+
+void RPhone::Destruct()
+{
+}
+
+RMobilePhone::RMobilePhone()
+{
+}
+
+void RMobilePhone::ConstructL()
+{    
+}
+
+RMobilePhone::TMultimodeType::TMultimodeType()
+{
+}
+
+TInt RMobilePhone::TMultimodeType::ExtensionId() const
+{
+    return 0;
+}
+
+void RMobilePhone::GetMailboxNumbers(
+    TRequestStatus& aReqStatus, 
+    TDes8& aMailBox) const
+{
+    RMobilePhone::TMobilePhoneVoicemailIdsV3 info;
+    RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg infoPckg(info);
+    info.iVoice = 1;
+    aMailBox.Copy(infoPckg);
+    TRequestStatus* tmp = &aReqStatus;
+    User::RequestComplete(tmp, KErrNone);
+    qDebug("RMobilePhoneStore::GetMailboxNumbers mock");
+}
+
+RMobilePhone::TMobilePhoneVoicemailIdsV3::TMobilePhoneVoicemailIdsV3()
+    : iVoice(0),
+      iData(0),
+      iFax(0),
+      iOther(0) 
+{  
+}
+
+void RMobilePhone::Destruct()
+{   
+}
+
+TInt RMobilePhone::GetIccAccessCaps(TUint32& /*aCaps*/) const
+{   
+    return KErrNone;
+}
+
+RTelServer::RTelServer()
+{ 
+}
+
+TInt RTelServer::Connect(TInt /*aMessageSlots*/)
+{
+    return KErrNone;
+}
+
+TInt RTelServer::LoadPhoneModule(const TDesC& /*aFileName*/) const
+{
+    return KErrNone;
+}
+
+TInt RTelServer::SetExtendedErrorGranularity(
+    const TErrorGranularity /*aGranularity*/) const
+{
+    return KErrNone;
+}
+
+TInt RTelServer::GetPhoneInfo(
+    const TInt /*aIndex*/, TPhoneInfo& /*aInfo*/) const
+{
+    return KErrNone;
+}
+
+RMobilePhoneStore::RMobilePhoneStore()
+{
+}
+
+void RMobilePhoneStore::GetInfo(
+    TRequestStatus& aReqStatus, TDes8& aInfo) const
+{
+    RMobilePhoneBookStore::TMobilePhoneBookInfoV1 info;
+    info.iCaps = 0x10000000;
+    RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg pckgInfo( info );
+    aInfo.Copy( pckgInfo ); 
+    TRequestStatus* tmp = &aReqStatus;
+    User::RequestComplete(tmp, KErrNone);
+    qDebug("RMobilePhoneStore::GetInfo mock");
+}
+
+RMobilePhoneBookStore::RMobilePhoneBookStore()
+{    
+}
+
+TInt RMobilePhoneBookStore::Open(
+    RMobilePhone& /*aPhone*/, const TDesC& /*aStore*/)
+{
+    return KErrNone;
+}
+
+RMobilePhoneStore::TMobilePhoneStoreInfoV1::TMobilePhoneStoreInfoV1()
+    :iType(RMobilePhoneStore::EPhoneStoreTypeUnknown),
+    iTotalEntries(0),
+    iUsedEntries(0),
+    iCaps(0),
+    iName(0)
+{   
+}
+
+RMobilePhoneBookStore::TMobilePhoneBookInfoV1::TMobilePhoneBookInfoV1()
+    :iMaxNumLength(0),
+     iMaxTextLength(0),
+     iLocation(RMobilePhoneBookStore::ELocationUnknown),
+     iChangeCounter(0),
+     iIdentity(0) 
+{
+}
+
+void RMobilePhoneBookStore::Close()
+{
+}
+
+void RMobilePhoneBookStore::Read(
+    TRequestStatus& aReqStatus, TInt /*aIndex*/, 
+    TInt /*aNumSlots*/, TDes8& /*aPBData*/) const
+{ 
+    TRequestStatus* tmp = &aReqStatus;
+    User::RequestComplete(tmp, KErrNone);
+}
+
+void RMobilePhoneBookStore::Write(
+    TRequestStatus& aReqStatus, 
+    const TDesC8& /*aPBData*/, TInt& /*aIndex*/) const
+{
+    TRequestStatus* tmp = &aReqStatus;
+    User::RequestComplete(tmp, KErrNone);
+}
+
+void RMobilePhoneStore::NotifyStoreEvent(
+    TRequestStatus& aReqStatus, 
+    TUint32& /*aEvent*/, TInt& /*aIndex*/) const
+{
+    TRequestStatus* tmp = &aReqStatus;
+    User::RequestComplete(tmp, KErrNone);
+}
+
+RTelSubSessionBase::RTelSubSessionBase()
+{
+}
+
+void RTelSubSessionBase::CancelAsyncRequest(TInt /*aReqToCancel*/) const
+{
+// refers to ut_ussd
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/main.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 <e32base.h>
+#include <QObject>
+#include <QtTest/QtTest>
+#include "ut_vmbxengine.h"
+#include "ut_pbkstore.h"
+#include "ut_simhandler.h"
+
+int main(int argc, char *argv[])
+{
+    qDebug("main() IN");
+    CTrapCleanup* cleanup = CTrapCleanup::New();
+    QApplication app(argc, argv);
+    
+    qDebug("testing start...");
+    
+    // API tester
+    Ut_VmbxEngine tc1;
+    char *pass[3];  
+    pass[0] = argv[0];
+    pass[1] = "-o"; 
+    pass[2] = "c:\\logs\\vmbx\\ut_vmbxengine.txt";
+    int result = -1;
+    result = QTest::qExec(&tc1, 3, pass);
+    qDebug("ut_vmbxengine result=%d", result);
+    
+    Ut_PbkStore tc2;
+    pass[2] = "c:\\logs\\vmbx\\ut_pbkstore.txt";
+    result = QTest::qExec(&tc2, 3, pass);
+    qDebug("Ut_PbkStore result=%d", result);
+    
+    // SIM can not be handled in Emulator.
+    // Root cause: CVmbxSimHandler::ConstructL()
+//    Ut_SimHandler tc3;
+//    pass[2] = "c:\\logs\\vmbx\\ut_simhandler.txt";
+//    result = QTest::qExec(&tc3, 3, pass);
+//    qDebug("Ut_SimHandler result=%d", result);
+    
+    qDebug("testing end...");
+    qDebug("main() OUT");
+    delete cleanup;
+    cleanup = NULL;
+    return result;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/mpbutil_mock.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 <mpbutil.h>
+#include <e32base.h>
+#include <e32des8.h>
+
+CPhoneBookBuffer::CPhoneBookBuffer():iMonitor(NULL,0,0)
+{
+}
+
+void CPhoneBookBuffer::Set(TDes8* /*aData*/){}
+
+TInt CPhoneBookBuffer::AddNewEntryTag()
+{ return 0; }
+
+TInt CPhoneBookBuffer::AddNewNumberTag()
+{ return 0; }
+
+TInt CPhoneBookBuffer::PutTagAndValue(TUint8 /*aTagValue*/, TUint8 /*aInteger*/)
+{ return 0; }
+
+TInt CPhoneBookBuffer::PutTagAndValue(TUint8 /*aTagValue*/, TUint16 /*aInteger*/)
+{ return 0; }
+
+TInt CPhoneBookBuffer::PutTagAndValue(TUint8 /*aTagValue*/, TUint32 /*aInteger*/)
+{ return 0; }
+
+TInt CPhoneBookBuffer::PutTagAndValue(TUint8 /*aTagValue*/, const TDesC8 &/*aData*/)
+{ return 0; }
+
+TInt CPhoneBookBuffer::PutTagAndValue(TUint8 /*aTagValue*/, const TDesC16 &/*aData*/)
+{ return 0; }
+
+TInt CPhoneBookBuffer::RemovePartialEntry()
+{ return 0; }
+
+void CPhoneBookBuffer::StartRead(){}
+
+TInt CPhoneBookBuffer::GetTagAndType(TUint8 &/*aTagValue*/, TPhBkTagType &/*aDataType*/)
+{ return 0; }
+
+TInt CPhoneBookBuffer::GetValue(TUint8 &/*aInteger*/)
+{ return 0; }
+
+TInt CPhoneBookBuffer::GetValue(TUint16 &/*aInteger*/)
+{ return 0; }
+
+TInt CPhoneBookBuffer::GetValue(TUint32 &/*aInteger*/)
+{ return 0; }
+
+TInt CPhoneBookBuffer::GetValue(TPtrC8 &/*aData*/)
+{ return 0; }
+
+TInt CPhoneBookBuffer::GetValue(TPtrC16 &/*aData*/)
+{ return 0; }
+
+void CPhoneBookBuffer::SkipValue(TPhBkTagType /*aDataType*/){}
+
+TInt CPhoneBookBuffer::BufferLength()
+{ return 0; }
+
+TInt CPhoneBookBuffer::RemainingReadLength()
+{ return 0; }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/qtuihandler_mock.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 <QtTest/QtTest>
+#include "vmbxqtuihandler.h"
+
+VmbxQtUiHandler::VmbxQtUiHandler(QObject* parent): QObject(parent)
+{
+    qDebug("mock VmbxQtUiHandler");
+}
+
+VmbxQtUiHandler::~VmbxQtUiHandler()
+{
+    qDebug("mock ~VmbxQtUiHandler");
+}
+
+
+void VmbxQtUiHandler::showVmbxQueryDialog(const TVmbxType& /*aType*/,
+                          QString& /*aNumber*/, int& aResult)
+{
+    qDebug("mock showVmbxQueryDialog");
+    aResult = KErrNone;
+}
+
+
+void VmbxQtUiHandler::showDefineSelectionDialog(
+    TVmbxType& /*aType*/, int& aResult)
+{
+    qDebug("mock showDefineSelectionDialog");
+    // Make sure no leave in CVoiceMailboxImpl::QueryVmbxTypeL(
+    aResult = KErrNotFound;
+}
+
+void VmbxQtUiHandler::showInformationNote(const TVmbxNoteType /*aType*/)
+{
+    qDebug("mock showInformationNote");    
+}
+
+void VmbxQtUiHandler::showCallSelectionDialog(
+            const QList<CVoiceMailboxEntry *> /*entryList*/,
+            TVoiceMailboxParams &/*params*/, int &/*result*/ )
+{
+    qDebug("mock showCallSelectionDialogL");  
+}
+
+//End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/ut_pbkstore.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies 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 <QtTest/QtTest>
+#include <cvoicemailboxentry.h>
+#include "vmbxpbkstore.h"
+#include "ut_pbkstore.h"
+
+Ut_PbkStore::Ut_PbkStore():mPbk(NULL)
+{
+    createPbk();
+}
+
+Ut_PbkStore::~Ut_PbkStore()
+{
+    deletePbk();
+}
+
+void Ut_PbkStore::testCreateAndDelete()
+{
+    createPbk();
+    deletePbk(); 
+}
+
+void Ut_PbkStore::testIsWritable()
+{
+    createPbk();
+    QCOMPARE(mPbk->IsWritable(), 1);
+    deletePbk();     
+}
+void Ut_PbkStore::testPhoneBookType()
+{
+    createPbk();
+    QCOMPARE(mPbk->PhoneBookType(), EMBDNPhoneBook);
+    deletePbk(); 
+}
+
+/*
+void Ut_PbkStore::testWrite()
+{
+    createPbk();
+    CVoiceMailboxEntry *entry = NULL;
+    TInt err = KErrNotFound;
+    
+    TRAP(err, entry = CVoiceMailboxEntry::NewL());
+    qDebug("CVoiceMailboxEntry::NewL %d", err);
+    err = mPbk->Write(*entry);
+    qDebug("Write err %d", err);
+    QCOMPARE(err, KErrNone);
+    
+    delete entry;
+    entry = NULL;
+    deletePbk(); 
+}
+*/
+void Ut_PbkStore::testPhonebookStore()
+{
+    createPbk();
+    mPbk->PhonebookStore();
+    deletePbk(); 
+}
+/*
+void Ut_PbkStore::testGetL()
+{
+    createPbk();
+    TInt err = KErrNotFound;
+    CVoiceMailboxEntry *entry = NULL;
+    
+    TRAP(err, entry = CVoiceMailboxEntry::NewL());
+    qDebug("CVoiceMailboxEntry::NewL %d", err);
+    mPbk->GetL(*entry);
+    
+    delete entry;
+    entry = NULL;
+    deletePbk(); 
+}
+*/
+void Ut_PbkStore::createPbk()
+{
+    if (!mPbk){
+        TRAPD(err, mPbk = CVmbxPbkStore::NewL());
+        QVERIFY(mPbk);  
+        qDebug("Create CVmbxPbkStore", err);
+    }
+}
+
+void Ut_PbkStore::deletePbk()
+{
+    delete mPbk;
+    mPbk = NULL;
+    qDebug("Delete CVmbxPbkStore");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/ut_simhandler.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#include <QtTest/QtTest>
+#include <cvoicemailboxentry.h>
+#include "vmbxsimhandler.h"
+#include "ut_simhandler.h"
+
+Ut_SimHandler::Ut_SimHandler():mSim(NULL)
+{
+    createSim();
+}
+
+Ut_SimHandler::~Ut_SimHandler()
+{
+    deleteSim();
+}
+
+void Ut_SimHandler::testCreateAndDelete()
+{
+    createSim();
+    deleteSim(); 
+}
+
+//void Ut_SimHandler::testGetL()
+//{
+//    createSim();
+//    TInt err = KErrNotFound;
+//    CVoiceMailboxEntry *entry = NULL;
+//    
+//    TRAP(err, entry = CVoiceMailboxEntry::NewL());
+//    qDebug("CVoiceMailboxEntry::NewL %d", err);
+//    mSim->GetL(*entry);
+//    
+//    delete entry;
+//    entry = NULL;
+//    deleteSim(); 
+//}
+//
+//void Ut_SimHandler::testSave()
+//{
+//    createSim();
+//    
+//    TInt err = KErrNotFound;
+//    CVoiceMailboxEntry *entry = NULL;
+//    
+//    TRAP(err, entry = CVoiceMailboxEntry::NewL());
+//    qDebug("CVoiceMailboxEntry::NewL %d", err);    
+//    QCOMPARE(mSim->Save(*entry), KErrNone);
+//    
+//    deleteSim(); 
+//}
+
+void Ut_SimHandler::testIsWritable()
+{
+    createSim();
+    QCOMPARE(mSim->IsWritable(), 1);
+    deleteSim();     
+}
+
+void Ut_SimHandler::testNotifyStoreEvent()
+{
+    createSim();
+    TRequestStatus status;
+    TUint32 event;
+    TInt index; 
+    mSim->NotifyStoreEvent(status, event, index);
+    deleteSim();      
+}
+
+
+void Ut_SimHandler::testPhoneBookType()
+{
+    createSim();
+    QCOMPARE(mSim->PhoneBookType(), EMBDNPhoneBook);
+    deleteSim(); 
+}
+
+void Ut_SimHandler::testCancelAsyncRequest()
+{
+    createSim();
+    TInt req = -1;
+    mSim->CancelAsyncRequest(req);
+    deleteSim();  
+}
+
+void Ut_SimHandler::createSim()
+{
+    if (!mSim){
+        TRAPD(err, mSim = CVmbxSimHandler::NewL());
+        QVERIFY(mSim);  
+        qDebug("Create CVmbxSimHandler", err);
+    }
+}
+
+void Ut_SimHandler::deleteSim()
+{
+    delete mSim;
+    mSim = NULL;
+    qDebug("Delete CVmbxSimHandler");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/src/ut_vmbxengine.cpp	Fri May 14 16:24:46 2010 +0300
@@ -0,0 +1,455 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Implementation of the Ut_VmbxEngine class
+*
+*/
+
+#include <QtTest/QtTest>
+#include <cvoicemailbox.h>
+#include <cvoicemailboxentry.h>
+#include <voicemailboxdefs.h>
+
+#include "ut_vmbxengine.h"
+
+_LIT(KNumber, "987654321");
+_LIT(KName, "Name");
+_LIT8(KBrandId, "Brand Id");
+
+Ut_VmbxEngine::Ut_VmbxEngine(): mVmbx(NULL),mEntry(NULL)
+{
+    qDebug("Ut_VmbxEngine");
+}
+
+// -----------------------------------------------------------------------------
+// Ut_VmbxEngine::~Ut_VmbxEngine
+// -----------------------------------------------------------------------------    
+Ut_VmbxEngine::~Ut_VmbxEngine()
+{
+    delete mVmbx;
+    mVmbx = NULL;
+    delete mEntry;
+    mEntry = NULL; 
+    qDebug("~Ut_VmbxEngine");
+}
+
+// Test API
+void Ut_VmbxEngine::testVmbxApi()
+{
+    createVmbxApi();
+    deleteVmbxApi();
+}
+
+void Ut_VmbxEngine::testEntryApi()
+{
+    createEntryApi();
+    deleteEntryApi();  
+}
+
+// Test Vmbx start
+void Ut_VmbxEngine::testGetStoredEntry()
+{
+    createVmbxApi();
+    
+    TVoiceMailboxParams params;
+    params.iType = EVmbxVoice;
+    CVoiceMailboxEntry *tmpEntry = NULL;
+    
+    QCOMPARE(mVmbx->GetStoredEntry(params, tmpEntry), KErrNone);
+    qDebug("Get entry");
+    if (tmpEntry){
+        delete tmpEntry;
+        tmpEntry = NULL;  
+        qDebug("delete tmp entry pointer");
+    }
+    
+    // Save a entry first, get and compare after that
+    createEntryApi();
+    mEntry->SetVoiceMailboxType(EVmbxVoice);
+    mEntry->SetVmbxNumber(KNumber);
+    qDebug("Set type");
+    QCOMPARE(mVmbx->SaveEntry(*mEntry), KErrNone);
+    qDebug("Save entry");
+    deleteEntryApi();
+    
+    params.iType = EVmbxVoice;
+    mVmbx->GetStoredEntry(params, tmpEntry);
+    qDebug("Get entry");
+    if (tmpEntry){
+        QCOMPARE(tmpEntry->VoiceMailboxType(), EVmbxVoice);
+        delete tmpEntry;
+        tmpEntry = NULL;  
+        qDebug("delete tmp entry pointer");
+    }
+    
+    deleteVmbxApi();
+}
+
+void Ut_VmbxEngine::testSaveEntry()
+{
+    createVmbxApi();
+    
+    // Set some attributes to the new empty entry and save it
+    createEntryApi();
+    mEntry->SetVoiceMailboxType(EVmbxVoice);
+    mEntry->SetUsingMemoryLocation(EVmbxPhoneMemory);
+    mEntry->SetVmbxNumber(KNumber);
+    qDebug("Set type & location");
+    QCOMPARE(mVmbx->SaveEntry(*mEntry), KErrNone);
+    qDebug("Save entry");
+    deleteEntryApi();  
+    
+    TVoiceMailboxParams params;
+    params.iType = EVmbxVoice;
+    CVoiceMailboxEntry *tmpEntry = NULL;;
+    mVmbx->GetStoredEntry(params, tmpEntry);
+    qDebug("Get entry");
+    if (tmpEntry){
+        QCOMPARE(tmpEntry->VoiceMailboxType(), EVmbxVoice);
+        qDebug("Verify type");
+        QCOMPARE(tmpEntry->UsingMemoryLocation(), EVmbxPhoneMemory);
+        qDebug("Verify location");
+        delete tmpEntry;
+        tmpEntry = NULL;
+    }
+    deleteVmbxApi();
+}
+
+void Ut_VmbxEngine::testQueryNewEntry()
+{
+    createVmbxApi();
+    CVoiceMailboxEntry *tmpEntry = NULL;
+    TVoiceMailboxParams params;
+    
+    // Query a new voice entry
+    // Mock the CRepository
+    params.iType = EVmbxVoice;  
+    QCOMPARE(mVmbx->QueryNewEntry(params, tmpEntry), KErrNone);
+    QVERIFY(tmpEntry);
+    QCOMPARE(tmpEntry->VoiceMailboxType(), EVmbxVoice);
+    delete tmpEntry;
+    tmpEntry = NULL;
+    
+    /*
+    // Query a new Video entry
+    params.iType = EVmbxVideo;
+    QCOMPARE(mVmbx->QueryNewEntry(params, tmpEntry), KErrNone);
+    QVERIFY(tmpEntry);
+    QCOMPARE(tmpEntry->VoiceMailboxType(), EVmbxVideo);
+    delete tmpEntry;
+    tmpEntry = NULL;
+    
+    // Query a new voice entry
+    params.iType = EVmbxVoip;
+    QCOMPARE(mVmbx->QueryNewEntry(params, tmpEntry), KErrNone);
+    QVERIFY(tmpEntry);
+    QCOMPARE(tmpEntry->VoiceMailboxType(), EVmbxVoip);
+    delete tmpEntry;
+    tmpEntry = NULL;    
+    
+    // Query a unknown entry
+    params.iType = EVmbxNone;
+    QCOMPARE(mVmbx->QueryNewEntry(params, tmpEntry), KErrNone);
+    QVERIFY(tmpEntry);
+    QCOMPARE(tmpEntry->VoiceMailboxType(), EVmbxNone);
+    delete tmpEntry;
+    tmpEntry = NULL;       
+    */
+    deleteVmbxApi();
+    
+}
+
+void Ut_VmbxEngine::testQueryChangeEntry()
+{
+    createVmbxApi();
+    
+    CVoiceMailboxEntry *tmpEntry = NULL;;
+    TVoiceMailboxParams params;
+    params.iType = EVmbxVoice;  
+    // Always get KErrNotFound, Check why.
+    //QCOMPARE(mVmbx->QueryChangeEntry(params, tmpEntry), KErrNone);
+    mVmbx->QueryChangeEntry(params, tmpEntry);
+    //QVERIFY(tmpEntry);
+    delete tmpEntry;
+    tmpEntry = NULL;    
+    
+    deleteVmbxApi();
+}
+
+void Ut_VmbxEngine::testQueryVmbxType()
+{
+    createVmbxApi(); 
+
+    // Save a entry first
+    CVoiceMailboxEntry *tmpEntry = NULL;
+    TVoiceMailboxParams params;
+    params.iType = EVmbxVoice;  
+    QCOMPARE(mVmbx->QueryNewEntry(params, tmpEntry), KErrNone);
+    tmpEntry->SetVoiceMailboxType(EVmbxVoice);
+    tmpEntry->SetVmbxNumber(KNumber);
+    QCOMPARE(mVmbx->SaveEntry(*tmpEntry), KErrNone);
+    delete tmpEntry;
+    tmpEntry = NULL;
+    
+    // Query and compare vmbx type after saving
+    mVmbx->QueryVmbxType(params);
+
+    deleteVmbxApi();
+}
+
+// TODO: Add 2 public test cases for notification, mock observer frist.
+//void testNotifyVmbxNumberChangeL();
+//void NotifyVmbxNumberChangeCancel();
+
+void Ut_VmbxEngine::testGetServiceIds()
+{
+    createVmbxApi(); 
+    /*
+    // Save a entry first
+    createEntryApi();
+    TServiceId idExp(10);
+    mEntry->SetServiceId(idExp);
+    mEntry->SetVoiceMailboxType(EVmbxVoip);
+    QCOMPARE(mVmbx->SaveEntry(*mEntry), KErrNone);
+    deleteEntryApi();
+    
+    // Query and compare vmbx type after saving
+    RIdArray ids;
+    QCOMPARE(mVmbx->GetServiceIds(ids), KErrNone);
+    TServiceId idAct = ids[0];
+    QCOMPARE(idAct, idExp);
+    */
+    deleteVmbxApi();    
+}
+
+void Ut_VmbxEngine::testCheckConfiguration()
+{
+    createVmbxApi();
+    TVoiceMailboxParams params;
+    params.iType = EVmbxVoice;
+    TBool result = mVmbx->CheckConfiguration(
+        params, EVmbxChangeNbrAllowedOnUi);
+    if (!result) {
+        QEXPECT_FAIL("","voice not allowed changed", Continue);
+    }
+    params.iType = EVmbxVideo;
+    result = mVmbx->CheckConfiguration(
+        params,EVmbxChangeNbrAllowedOnUi);
+    if (!result) {
+        QEXPECT_FAIL("","video not allowed changed", Continue);
+    }
+    params.iType = EVmbxVoip;
+    result = mVmbx->CheckConfiguration(
+        params,EVmbxChangeNbrAllowedOnUi);
+    if (result) {
+        QFAIL ("voip failed");
+    }
+    deleteVmbxApi();
+}
+
+void Ut_VmbxEngine::testSaveProvisionedEntry()
+{
+    createVmbxApi();    
+    // Voice
+    createEntryApi();
+    mEntry->SetVoiceMailboxType(EVmbxVoice);
+    mEntry->SetVmbxNumber(KNumber);
+    QCOMPARE(mVmbx->SaveProvisionedEntry(*mEntry), KErrNone);
+    deleteEntryApi();
+    
+    // Video
+    createEntryApi();
+    mEntry->SetVoiceMailboxType(EVmbxVideo);
+    mEntry->SetVmbxNumber(KNumber);
+    QCOMPARE(mVmbx->SaveProvisionedEntry(*mEntry), KErrNone);
+    deleteEntryApi();
+    
+    deleteVmbxApi();
+}
+// Test Vmbx end
+
+
+// Test Entry start
+void Ut_VmbxEngine::testType()
+{
+    createEntryApi();
+    mEntry->SetVoiceMailboxType(EVmbxNone);
+    QCOMPARE(mEntry->VoiceMailboxType(), EVmbxNone);
+    
+    mEntry->SetVoiceMailboxType(EVmbxVoice);
+    QCOMPARE(mEntry->VoiceMailboxType(), EVmbxVoice);
+    
+    mEntry->SetVoiceMailboxType(EVmbxVideo);
+    QCOMPARE(mEntry->VoiceMailboxType(), EVmbxVideo);
+    
+    deleteEntryApi();
+}
+
+void Ut_VmbxEngine::testName()
+{
+    createEntryApi();
+    
+    // Valid string
+    TPtrC nameIn(KName);
+    mEntry->SetVmbxName(nameIn);
+    TPtrC nameOut(KNullDesC);
+    mEntry->GetVmbxName(nameOut);
+    QCOMPARE(nameOut, nameIn);
+    
+    // Invalid string
+//    HBufC *name = HBufC::NewLC(KVmbxMaxNumberLength+1);
+//    QCOMPARE(mEntry->SetVmbxName(name->Des()), KErrArgument);
+//    CleanupStack::PopAndDestroy(name);
+    
+    deleteEntryApi();      
+}
+
+void Ut_VmbxEngine::testServiceId()
+{
+    createEntryApi();
+    
+    TServiceId idIn(10);
+    mEntry->SetServiceId(idIn);
+    QCOMPARE(mEntry->ServiceId(), idIn);    
+    
+    deleteEntryApi();      
+}
+
+void Ut_VmbxEngine::testLineType()
+{
+    createEntryApi();
+   
+    // Als is disable in TB10.1
+    /*
+    mEntry->SetVmbxAlsLineType(EVmbxAlsLineDefault);
+    QCOMPARE(mEntry->VmbxAlsLineType(), EVmbxAlsLineDefault);
+    
+    mEntry->SetVmbxAlsLineType(EVmbxAlsLine1);
+    QCOMPARE(mEntry->VmbxAlsLineType(), EVmbxAlsLine1);
+    
+    mEntry->SetVmbxAlsLineType(EVmbxAlsLine2);
+    QCOMPARE(mEntry->VmbxAlsLineType(), EVmbxAlsLine2);
+    */
+    deleteEntryApi();  
+}
+
+void Ut_VmbxEngine::testNumber()
+{
+    createEntryApi();
+    
+    // Valid number
+    TPtrC numberIn(KNumber);
+    mEntry->SetVmbxNumber(numberIn);
+    TPtrC numberOut(KNullDesC);
+    mEntry->GetVmbxNumber(numberOut);
+    QCOMPARE(numberOut, numberIn);
+    
+    // Invalid number
+//    HBufC *number = HBufC::NewLC(KVmbxMaxNumberLength+1);
+//    QCOMPARE(mEntry->SetVmbxNumber(number->Des()), KErrArgument);
+//    CleanupStack::PopAndDestroy(number);
+    
+    deleteEntryApi();  
+}
+
+void Ut_VmbxEngine::testBrandId()
+{
+    createEntryApi();
+
+    // Valid braind id
+    TPtrC8 brandIn(KBrandId);
+    QCOMPARE(mEntry->SetBrandId(brandIn), KErrNone);  
+    
+    TPtrC8 brandOut(KNullDesC8);
+    QCOMPARE(mEntry->GetBrandId(brandOut), KErrNone);
+    
+    if (brandOut.Compare(brandIn)){
+        QFAIL("Fail to Set/Get BrandId");
+    }
+    
+    // Invalid Brand Id
+//    HBufC8 *invalid = HBufC8::NewLC(KVmbxMaxNumberLength+1);
+//    QCOMPARE(mEntry->SetBrandId(invalid->Des()), KErrArgument);
+//    CleanupStack::PopAndDestroy(invalid);    
+    
+    deleteEntryApi();  
+}
+
+void Ut_VmbxEngine::testUsingMemoryLocation()
+{
+    createEntryApi();
+    
+    mEntry->SetUsingMemoryLocation(EVmbxPhoneMemory);
+    QCOMPARE(mEntry->UsingMemoryLocation(), EVmbxPhoneMemory);
+    
+    mEntry->SetUsingMemoryLocation(EVmbxSimMemory);
+        QCOMPARE(mEntry->UsingMemoryLocation(), EVmbxSimMemory);
+        
+    deleteEntryApi();  
+}
+
+void Ut_VmbxEngine::testReset()
+{
+    createEntryApi();
+    
+    mEntry->Reset();
+    QCOMPARE(mEntry->ServiceId(), KVmbxServiceIdNone);
+    QCOMPARE(mEntry->VoiceMailboxType(), EVmbxNone);
+    QCOMPARE(mEntry->VmbxAlsLineType(), EVmbxAlsLineDefault);
+    
+    TPtrC8 brand(KNullDesC8);
+    QCOMPARE(mEntry->GetBrandId(brand), KErrNotFound);
+    
+    TPtrC name;
+    QCOMPARE(mEntry->GetVmbxName(name), KErrNotFound);
+    
+    TPtrC number;
+    QCOMPARE(mEntry->GetVmbxNumber(number), KErrNotFound);
+    
+    QCOMPARE(mEntry->UsingMemoryLocation(), EVmbxSimMemory);
+    
+    deleteEntryApi();  
+}
+// Test Entry end 
+
+// Private function: create 2 data member
+void Ut_VmbxEngine::createVmbxApi()
+{   
+    if (!mVmbx){
+        TRAPD( err, mVmbx = CVoiceMailbox::NewL());
+        QVERIFY(mVmbx);
+        qDebug("Create vmbx api TRAP: %d", err);
+    }
+}
+void Ut_VmbxEngine::deleteVmbxApi()
+{
+    delete mVmbx;
+    mVmbx = NULL;
+    qDebug("Delete vmbx api");
+}
+void Ut_VmbxEngine::createEntryApi()
+{
+    if (!mEntry){
+        TRAPD( err, mEntry = CVoiceMailboxEntry::NewL());
+        QVERIFY(mEntry);
+        qDebug("Create entry Api TRAP: %d", err);
+    }  
+}
+
+void Ut_VmbxEngine::deleteEntryApi()
+{
+    delete mEntry;
+    mEntry = NULL;
+    qDebug("Delete entry api");
+}
+// End of file
--- a/vmbx/vmbxengine/tsrc/ut_vmbxengine/ut_vmbxengine.pro	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/ut_vmbxengine.pro	Fri May 14 16:24:46 2010 +0300
@@ -15,49 +15,109 @@
 #
 
 TEMPLATE = app
-TARGET = 
-DEPENDPATH += .
-INCLUDEPATH += .
+TARGET = ut_vmbxengine
+TARGET.EPOCALLOWDLLDATA = 1
+
 CONFIG += hb
 CONFIG += qtestlib
 
+DEPENDPATH += .
+
+INCLUDEPATH += .
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+HEADERS += \epoc32\include\platform\mw\cvoicemailbox.h
+HEADERS += \epoc32\include\platform\mw\cvoicemailboxentry.h
+
+INCLUDEPATH += ..\..\inc
+
+HEADERS += $$PUBLIC_HEADERS
+
 symbian: { 
     TARGET.CAPABILITY = CAP_GENERAL_DLL
 }
 
-symbian {
-    INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
-                  /epoc32/include/mw/QtTest \
-                  ../../inc
-
-    LIBS += -lvmbxengine.dll\
-             -lflogger.dll
-    TARGET.CAPABILITY = ALL -TCB
-}
+# Code subject to test 
+SOURCES += ..\..\src\vmbxuihandler.cpp
+# It is mocked by qtuihandler_mock.cpp, remove the real one
+#SOURCES += ..\..\src\vmbxqtuihandler.cpp
+SOURCES += ..\..\src\voicemailboximpl.cpp
+SOURCES += ..\..\src\vmbxpbkstore.cpp
+SOURCES += ..\..\src\vmbxetelconnection.cpp
+SOURCES += ..\..\src\vmbxsimhandler.cpp
+SOURCES += ..\..\src\vmbxcenrephandler.cpp
+SOURCES += ..\..\src\vmbxutilities.cpp
+SOURCES += ..\..\src\vmbxenginefactory.cpp
+SOURCES += ..\..\src\vmbxenginebase.cpp
+SOURCES += ..\..\src\vmbxcsvoiceengine.cpp
+SOURCES += ..\..\src\vmbxcsvideoengine.cpp
+SOURCES += ..\..\src\vmbxvoipengine.cpp
+SOURCES += ..\..\src\vmbxemergencycall.cpp  
+SOURCES += ..\..\src\vmbxuiutilities.cpp
+SOURCES += ..\..\src\vmbxcenrepobserver.cpp
+SOURCES += ..\..\src\vmbxsimstoreobserver.cpp
+SOURCES += ..\..\src\vmbxsatrefreshobserver.cpp
+SOURCES += ..\..\src\vmbxobserver.cpp
+SOURCES += ..\..\src\vmbshandler.cpp
+SOURCES += ..\..\src\vmspshandler.cpp
+SOURCES += ..\..\src\vmsettingsuiiconfileprovider.cpp
+SOURCES += ..\..\src\cvoicemailbox.cpp
+SOURCES += ..\..\src\cvoicemailboxentry.cpp
 
-# Input
-HEADERS += $$PUBLIC_HEADERS
-HEADERS += ut_vmbxengine.h
-SOURCES += ut_vmbxengine.cpp\
-          ..\..\src\vmbxuihandler.cpp\
-          ..\..\src\vmbxqtuihandler.cpp\
-          ..\..\src\voicemailboximpl.cpp\
-          ..\..\src\vmbxpbkstore.cpp\
-          ..\..\src\vmbxetelconnection.cpp\
-          ..\..\src\vmbxsimhandler.cpp\
-          ..\..\src\vmbxcenrephandler.cpp\
-          ..\..\src\vmbxutilities.cpp\
-          ..\..\src\vmbxenginefactory.cpp\
-          ..\..\src\vmbxenginebase.cpp\
-          ..\..\src\vmbxcsvoiceengine.cpp\
-          ..\..\src\vmbxcsvideoengine.cpp\
-          ..\..\src\vmbxvoipengine.cpp\
-          ..\..\src\vmbxemergencycall.cpp\	
-          ..\..\src\vmbxuiutilities.cpp\
-          ..\..\src\vmbxcenrepobserver.cpp\
-          ..\..\src\vmbxsimstoreobserver.cpp\
-          ..\..\src\vmbxsatrefreshobserver.cpp\
-          ..\..\src\vmbxobserver.cpp\
-          ..\..\src\vmbshandler.cpp\
-          ..\..\src\vmspshandler.cpp\
-          ..\..\src\vmsettingsuiiconfileprovider.cpp
+HEADERS += ..\..\inc\vmbxuihandler.h
+HEADERS += ..\..\inc\vmbxqtuihandler.h
+HEADERS += ..\..\inc\voicemailboximpl.h
+HEADERS += ..\..\inc\vmbxpbkstore.h
+HEADERS += ..\..\inc\vmbxetelconnection.h
+HEADERS += ..\..\inc\vmbxsimhandler.h
+HEADERS += ..\..\inc\vmbxcenrephandler.h
+HEADERS += ..\..\inc\vmbxutilities.h
+HEADERS += ..\..\inc\vmbxenginefactory.h
+HEADERS += ..\..\inc\vmbxenginebase.h
+HEADERS += ..\..\inc\vmbxcsvoiceengine.h
+HEADERS += ..\..\inc\vmbxcsvideoengine.h
+HEADERS += ..\..\inc\vmbxvoipengine.h
+HEADERS += ..\..\inc\vmbxemergencycall.h  
+HEADERS += ..\..\inc\vmbxuiutilities.h
+HEADERS += ..\..\inc\vmbxcenrepobserver.h
+HEADERS += ..\..\inc\vmbxsimstoreobserver.h
+HEADERS += ..\..\inc\vmbxsatrefreshobserver.h
+HEADERS += ..\..\inc\vmbxobserver.h
+HEADERS += ..\..\inc\vmbshandler.h
+HEADERS += ..\..\inc\vmspshandler.h
+HEADERS += ..\..\inc\vmsettingsuiiconfileprovider.h
+
+HEADERS += ..\..\inc\mvmbxcenrephandler.h 
+HEADERS += ..\..\inc\mvmbxcenrepobserver.h 
+HEADERS += ..\..\inc\mvmbxchangeobserver.h 
+HEADERS += ..\..\inc\mvmbxresourceprovider.h
+HEADERS += ..\..\inc\mvmbxsatrefreshobserver.h
+HEADERS += ..\..\inc\mvmbxservicenotify.h
+HEADERS += ..\..\inc\mvmbxsimstoreobserver.h
+HEADERS += ..\..\inc\mvmbxuihandler.h
+HEADERS += ..\..\inc\mvmbxuiutilities.h
+
+# Test code
+HEADERS += inc\ut_vmbxengine.h
+HEADERS += inc\ut_pbkstore.h
+HEADERS += inc\ut_simhandler.h
+
+SOURCES += src\ut_vmbxengine.cpp
+SOURCES += src\ut_pbkstore.cpp
+SOURCES += src\ut_simhandler.cpp
+SOURCES += src\main.cpp
+
+# Mock class
+SOURCES += src\etel_mock.cpp
+SOURCES += src\mpbutil_mock.cpp
+SOURCES += src\qtuihandler_mock.cpp
+SOURCES += src\cenrep_mock.cpp
+
+LIBS += -lflogger.dll
+LIBS += -lfeatmgr.dll    
+LIBS += -lcenrepnotifhandler.dll
+LIBS += -lphoneclient.dll
+LIBS += -lsssettings.dll
+LIBS += -lsatclient.dll
+LIBS += -lserviceprovidersettings.dll
+    
+#End of files
\ No newline at end of file
--- a/vmbx/vmbxengine/vmbxengine.pro	Mon May 03 13:01:45 2010 +0300
+++ b/vmbx/vmbxengine/vmbxengine.pro	Fri May 14 16:24:46 2010 +0300
@@ -22,14 +22,16 @@
 HEADERS += $$PUBLIC_HEADERS
 
 CONFIG += hb
+MOC_DIR = moc
 
 symbian: {
     TARGET.CAPABILITY = CAP_GENERAL_DLL
     TARGET.EPOCALLOWDLLDATA = 1
     TARGET.UID3=0x1000590F
     INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
-        ../../inc \
-        ./inc
+                   $$MOC_DIR \
+                   ../../inc \
+                   ./inc
         
     LIBS += -lcentralrepository.dll \
             -lcenrepnotifhandler.dll \
@@ -76,7 +78,8 @@
                inc/voicemailboxdefsinternal.h \
                inc/voicemailboxdomaincrkeys.h \
                inc/voicemailboximpl.h \
-               inc/voicemailboxprivatecrkeys.h
+               inc/voicemailboxprivatecrkeys.h \
+               inc/dialogwaiter.h
 
     SOURCES += src/vmbxcenrepobserver.cpp \
                src/vmbxcsvoiceengine.cpp \
@@ -101,7 +104,8 @@
                src/vmbxetelconnection.cpp \
                src/vmbxenginefactory.cpp \
                src/vmbxenginebase.cpp \
-               src/vmbxemergencycall.cpp
+               src/vmbxemergencycall.cpp \
+               src/dialogwaiter.cpp
                
      defFiles = \
         "$${LITERAL_HASH}ifdef WINS" \
@@ -118,7 +122,9 @@
                                  "rom/backup_registration.xml   /epoc32/release/winscw/udeb/z/private/100058F5/backup_registration.xml" \
                                  "rom/backup_registration.xml   /epoc32/release/winscw/urel/z/private/100058F5/backup_registration.xml" \
                                  "rom/vmbxengine_stub.sis /epoc32/data/z/system/install/vmbxengine_stub.sis" \
-                                 "rom/vmbxengine.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vmbxengine.iby)"
-                                 
+                                 "rom/vmbxengine.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vmbxengine.iby)" \
+                                 "rom/vmbxresources.iby       LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(vmbxresources.iby)"
+TRANSLATIONS = vmbx.ts
+
 }