Revision: 201035 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 15 Sep 2010 11:56:55 +0300
branchRCL_3
changeset 74 6b5524b4f673
parent 68 9da50d567e3c
child 76 a7e7933e67a8
child 85 38bb213f60ba
Revision: 201035 Kit: 201036
contacts_plat/phonebook_2_presentation_api/inc/Pbk2IconId.hrh
contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/conf/PsClientTestSuitePRC.cfg
contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/group/PsClientTestSuite.mmp
contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/group/PsClientTestSuitePRC.pkg
contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/inc/TestSuiteInputData.h
contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/src/TestSuiteInputData.cpp
contacts_pub/phonebook_data_addedit_ui_api/tsrc/bc/src/BCTestPbkDataAddEditBlocks.cpp
logsui/AppSrc/CLogsDetailView.cpp
logsui/AppSrc/CLogsRecentListControlContainer.cpp
logsui/AppSrc/CLogsRecentListView.cpp
phonebookengines/contactsmodel/groupsql/app-engines_cntmodel.mrp
phonebookui/Phonebook2/Application/src/CPbk2AppUi.cpp
phonebookui/Phonebook2/CommonUI/rss/Pbk2IconInfo.rss
phonebookui/Phonebook2/GroupExtension/inc/CPguAddMembersCmd.h
phonebookui/Phonebook2/GroupExtension/inc/CPguRemoveFromGroupCmd.h
phonebookui/Phonebook2/GroupExtension/inc/mpgugroupcmd.h
phonebookui/Phonebook2/GroupExtension/src/CPguAddMembersCmd.cpp
phonebookui/Phonebook2/GroupExtension/src/CPguGroupMembersView.cpp
phonebookui/Phonebook2/GroupExtension/src/CPguRemoveFromGroupCmd.cpp
phonebookui/Phonebook2/MMCExtension/inc/CPmuCopyToMmcCmd.h
phonebookui/Phonebook2/MMCExtension/src/CPmuCopyToDriveCmd.cpp
phonebookui/Phonebook2/MapExtension/inc/cpmapcontacteditorextension.h
phonebookui/Phonebook2/MapExtension/src/cpmapcontacteditorextension.cpp
phonebookui/Phonebook2/NamesListExtension/src/NamesListExView.cpp
phonebookui/Phonebook2/Presentation/rss/Pbk2PresentationChineseUnSync.rss
phonebookui/Phonebook2/Presentation/rss/Pbk2PresentationCommonUnSync.rss
phonebookui/Phonebook2/Presentation/src/Pbk2PresentationUtils.cpp
phonebookui/Phonebook2/UIControls/inc/CPbk2ContactEditorDlgImpl.h
phonebookui/Phonebook2/UIControls/inc/CPbk2ContactViewListBox.h
phonebookui/Phonebook2/UIControls/rss/Pbk2IconResources.rss
phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDTMFField.cpp
phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDateField.cpp
phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDlgImpl.cpp
phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorEmailField.cpp
phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorImpplField.cpp
phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorNumberField.cpp
phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorPhoneNumberField.cpp
phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorPostalCodeField.cpp
phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorReadingField.cpp
phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorTextField.cpp
phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorUrlField.cpp
phonebookui/Phonebook2/UIControls/src/CPbk2FieldListBoxModel.cpp
phonebookui/Phonebook2/UIControls/src/CPbk2NamesListControl.cpp
phonebookui/Phonebook2/USIMExtension/inc/CPsu2FixedDialingView.h
phonebookui/Phonebook2/USIMExtension/rss/Pbk2USimFixedDialingView.rss
phonebookui/Phonebook2/USIMExtension/src/CPsu2FdnContactEditorPhoneNumberField.cpp
phonebookui/Phonebook2/USIMExtension/src/CPsu2FixedDialingView.cpp
phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/data/ccappcommlauncherpluginrsc.rss
phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/group/ccappcommlauncherplugin.mmp
phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/CCCAppCommLauncherPbkCmd.h
phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlauncher.hrh
phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlaunchermenuhandler.h
phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/CCCAppCommLauncherPbkCmd.cpp
phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherlpadmodel.cpp
phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlaunchermenuhandler.cpp
phonebookui/Phonebook2/ccapplication/ccacontactorservice/inc/ccacontactorserviceoperator.h
phonebookui/Phonebook2/ccapplication/ccacontactorservice/src/ccacontactorserviceoperator.cpp
phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/group/ccappdetailsviewplugin.mmp
phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/src/ccappdetailsviewlistboxmodel.cpp
phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycardplugin.cpp
phonebookui/Phonebook2/group/Pbk2GroupExtension.mmp
phonebookui/Phonebook2/group/Pbk2Presentation.mmp
phonebookui/Phonebook2/group/iconlist.txt
phonebookui/Phonebook2/inc/Pbk2Icons.hrh
phonebookui/Phonebook2/rom/Phonebook2Resources.iby
phonebookui/Speeddial/src/SpdiaAppUi.cpp
pimprotocols/pbap/inc/pbapvcardexporterutil.h
pimprotocols/pbap/server/pbapvcardexporterutil.cpp
predictivesearch/PcsAlgorithm/Algorithm2/inc/CPcsAlgorithm2MultiSearchHelper.h
predictivesearch/PcsAlgorithm/Algorithm2/src/CPcsAlgorithm2.cpp
predictivesearch/PcsAlgorithm/Algorithm2/src/CPcsAlgorithm2MultiSearchHelper.cpp
--- a/contacts_plat/phonebook_2_presentation_api/inc/Pbk2IconId.hrh	Tue Sep 14 20:54:53 2010 +0300
+++ b/contacts_plat/phonebook_2_presentation_api/inc/Pbk2IconId.hrh	Wed Sep 15 11:56:55 2010 +0300
@@ -67,7 +67,9 @@
     EPbk2qgn_prop_pb_no_valid_lm,
     EPbk2qgn_prop_blid_waypoint,
     EPbk2qgn_prop_radiobutt_off,
-    EPbk2qgn_prop_radiobutt_on
+    EPbk2qgn_prop_radiobutt_on,
+    EPbk2qgn_prop_phonebook2_unsync
+
     };
 
 #endif // PBK2ICONID_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/conf/PsClientTestSuitePRC.cfg	Wed Sep 15 11:56:55 2010 +0300
@@ -0,0 +1,1661 @@
+//##############################################################################
+//#                                                                            #
+//#                STIF Test suite for Predictive Search Engine                #
+//#                --------------------------------------------                #
+//#                                                                            #
+//# Initially designed for ITUT keyboard.                                      #
+//# Some tests are adapted for N97 which has a 3x11 keyboard.                  #
+//#                                                                            #
+//# TC_ITU: Test Case for ITUT keyboard.                                       #
+//# TC_N97: Test Case for N97 3x11 keyboard.                                   #
+//# TC_N00: Test Case for XXX 4x10 keyboard. (Phone model name not known yet)  #
+//# TC_DEA: Test Case Deactivated. Use in comments only.                       #
+//#                                                                            #
+//# NOTES:                                                                     #
+//#                                                                            #
+//# - In ITUT keyboard "0" and " " are on the same key.                        #
+//#   Therefore if some clients deliver a "0" in Itut predictive mode,         #
+//#   then the "0" has the double nature of a "0" and of a " " (separator).    #
+//#                                                                            #
+//# - In N97-3x11 and N00-4x10 keyboards "0" and " " are on different keys.    #
+//#   Therefore if some clients deliver a "0" in Qwerty predictive mode,       #
+//#   then the "0" has the single nature of a "0" (not a separator).           #
+//#                                                                            #
+//# - The SearchOnInputString and TC_<XXX>_SearchOnInputString test            #
+//#   drivers are identical. The naming is different in order to               #
+//#   comment/uncomment the test cases more easily.                            #
+//#   XXX = [ITU, N97, N00].                                                   #
+//#                                                                            #
+//# - The SearchLookupMatchString and TC_<XXX>_SearchLookupMatchString test    #
+//#   drivers are identical. The naming is different in order to               #
+//#   comment/uncomment the test cases more easily.                            #
+//#   XXX = [ITU, N97, N00].                                                   #
+//#                                                                            #
+//# - The TestSearchingInCache and TC_<XXX>_TestSearchingInCache test          #
+//#   drivers are identical. The naming is different in order to               #
+//#   comment/uncomment the test cases more easily.                            #
+//#   XXX = [ITU, N97, N00].                                                   #
+//#                                                                            #
+//# - The test:                                                                #
+//#       api TC_N<XX>_SearchOnInputString "IPSTR[Fake_Test]"                  #
+//#           "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]"              #
+//#           "MATCHLOC[0:1]"                                                  #
+//#   is a fake test that succeeds always. It can be used temporarily when for #
+//#   a certain keyboard there is not KeyMap available yet.                    #
+//#                                                                            #
+//##############################################################################
+
+
+//------------------------------------------------------------------------------
+//					Initial Set Up ("SU")
+//						- Server startup
+//						- Contacts/groups creation
+//						- Initial sort order
+//------------------------------------------------------------------------------
+
+
+//******************************************************************************
+[Test]
+title SU: Start Up the Server
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[6,EPredictiveItuT,EAlphaSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title SU: Create contacts in phone memory
+create PsClientTestSuite api
+api WriteTitleToLog
+api CreateContactsInPhone "CreateContacts[13,(FN:伟$,LN:开,CN:Finland)(FN:峰峰,LN:K,CN:Nokia)(FN:共鹏,LN:周,CN:TaiWan)(FN:利 华,LN:联 合,CN:美国)(FN:我 是 谁 娃 炅,LN:新年,CN:Nokia)(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)(FN:男,LN:虎,CN:Nokia)(FN:楚平,LN:人,CN:Nokia)(FN:任,LN:出凭,CN:Nokia)(FN:金,LN:+勇,CN:Nokia)(FN:@博 four,LN:!five)(FN:mahesh,LN:doraiswamy,CN:Nokia)(FN:0抓,LN:0图,CN:0Sam)]" "URI[cntdb:\/\/c:contacts.cdb]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title SU: Add a group and contacts in the group
+create PsClientTestSuite api
+api WriteTitleToLog
+api ADDGroups "AddGroups[同学,3,(FN:什么,LN:打,CN:Nokia)(FN:福气,LN:钱,CN:Nokia)(FN:mno,LN:同学家,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+// The following test case sets Name-Surname order - Keep in this position
+[Test]
+title SU: Change Sort Order to Name-Surname
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSortOrder "URI[cntdb:\/\/c:contacts.cdb]" "SORTORDER[6,4,27]"
+delete api
+[Endtest]
+
+
+//------------------------------------------------------------------------------
+//					TestDataOrder ("DO")
+//------------------------------------------------------------------------------
+
+
+//******************************************************************************
+[Test]
+title DO: Test for contacts
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestDataOrder "URI[cntdb:\/\/c:contacts.cdb]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title DO: Test for groups
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestDataOrder "URI[cntdb:\/\/c:contacts.gdb]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title DO: Test for wrong URI
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestDataOrderForErrL "URI[cntdb:\/\/c:wrongcontactsuri.cdb]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title DO: Test for group with group ID
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestDataOrder "URI[cntdb:\/\/c:contacts.gdb?id=3221]"
+delete api
+[Endtest]
+
+
+//------------------------------------------------------------------------------
+//					ConvertToVpbkLink ("VL")
+//------------------------------------------------------------------------------
+
+
+//******************************************************************************
+[Test]
+title VL: ConvertToVpbkLink - Test for contacts
+create PsClientTestSuite api
+api WriteTitleToLog
+api ConvertToVpbkLink "URI[cntdb:\/\/c:contacts.cdb]"
+delete api
+[Endtest]
+
+//******************************************************************************
+[Test]
+title VL: ConvertToVpbkLink - Test for groups
+create PsClientTestSuite api
+api WriteTitleToLog
+api ConvertToVpbkLink "URI[cntdb:\/\/c:contacts.gdb]"
+delete api
+[Endtest]
+
+
+//------------------------------------------------------------------------------
+//					CheckLanguageSupport ("LS")
+//------------------------------------------------------------------------------
+
+
+//******************************************************************************
+[Test]
+title LS: Check Language Support (1)
+create PsClientTestSuite api
+api WriteTitleToLog
+api CheckLanguageSupport "LANG[1,ETrue]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title LS: Check Language Support (2)
+create PsClientTestSuite api
+api WriteTitleToLog
+api CheckLanguageSupport "LANG[32,EFalse]"
+delete api
+[Endtest]
+
+
+//------------------------------------------------------------------------------
+//					SearchOnInputString ("IS")
+//------------------------------------------------------------------------------
+
+
+//******************************************************************************
+[Test]
+title IS: Single word (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_SearchOnInputString "IPSTR[阿才W]" "SQ[229,EPredictiveItuT,EPatternSort,5]" "RES[1,(-1:W)]" "MATCHLOC[2:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Single word (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_SearchOnInputString "IPSTR[Adam]" "SQ[@-,EPredictiveQwerty,EPatternSort,5]" "RES[1,(-1:AD)]" "MATCHLOC[0:2]"
+//api TC_DEA_SearchOnInputString "IPSTR[Just]" "SQ[+7,EPredictiveQwerty,EPatternSort,5]" "RES[1,(-1:JU)]" "MATCHLOC[0:2]"
+api TC_N00_SearchOnInputString "IPSTR[F测试]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Multi Search (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_SearchOnInputString "IPSTR[Adam 中文 Dusk]" "SQ[20903,EPredictiveItuT,EPatternSort,5]" "RES[1,(-1:A,-1:D)]" "MATCHLOC[0:1,8:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Multi Search (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_SearchOnInputString "IPSTR[Adam Dory Dusk]" "SQ[@ D -,EPredictiveQwerty,EPatternSort,5]" "RES[1,(-1:A,-1:D)]" "MATCHLOC[0:1,5:1,10:1]"
+//api TC_DEA_SearchOnInputString "IPSTR[Just Luke Last]" "SQ[+ L *,EPredictiveQwerty,EPatternSort,5]" "RES[1,(-1:J,-1:L)]" "MATCHLOC[0:1,5:1,10:1]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test 中文]" "SQ[F Z,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Single word (Non-predictive)
+create PsClientTestSuite api
+api WriteTitleToLog
+api SearchOnInputString "IPSTR[Hu中文ll]" "SQ[huz,ENonPredictive,EPatternSort,5]" "RES[1,(-1:HU)]" "MATCHLOC[0:2]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Multi Search (Non-predictive)
+create PsClientTestSuite api
+api WriteTitleToLog
+api SearchOnInputString "IPSTR[Gill Monk 中文]" "SQ[z m g,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:G,-1:M)]" "MATCHLOC[0:1,5:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Single word (Mixed ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_SearchOnInputString "IPSTR[Xe中文n]" "SQ[9w,in,EPatternSort,5]" "RES[1,(-1:X)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Single word (Mixed QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_SearchOnInputString "IPSTR[Xen]" "SQ[)e,qn,EPatternSort,5]" "RES[1,(-1:XE)]" "MATCHLOC[0:2]"
+//api TC_DEA_SearchOnInputString "IPSTR[Hen]" "SQ[-e,qn,EPatternSort,5]" "RES[1,(-1:HE)]" "MATCHLOC[0:2]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test 中文]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Multi Search (Mixed ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_SearchOnInputString "IPSTR[中文 Monk]" "SQ[90m6,iini,EAlphaSort,5]" "RES[1,(-1:MO)]" "MATCHLOC[3:2]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Multi Search (Mixed QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_SearchOnInputString "IPSTR[Tim Monk]" "SQ[5 m9,qqnq,EAlphaSort,5]" "RES[1,(-1:MO,-1:T)]" "MATCHLOC[0:1,4:2]"
+//api TC_DEA_SearchOnInputString "IPSTR[Tim Monk]" "SQ[5 m9,qqnq,EAlphaSort,5]" "RES[1,(-1:MO,-1:T)]" "MATCHLOC[0:1,4:2]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test 中文]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Single word (Predictive ITU-T) -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api SearchOnInputString "IPSTR[中文]" "SQ[902,EPredictiveItuT,EPatternSort,5]" "RES[0,]" "MATCHLOC[]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Multi Search (Predictive ITU-T) -> Partial match (1)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_SearchOnInputString "IPSTR[Adam Dory 中文]" "SQ[202,EPredictiveItuT,EAlphaSort,5]" "RES[1,(-1:A)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Multi Search (Predictive QWERTY) -> Partial match (1)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_SearchOnInputString "IPSTR[Adam Dory Dusk]" "SQ[@ @,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(-1:A)]" "MATCHLOC[0:1]"
+//api TC_DEA_SearchOnInputString "IPSTR[Just Luke Last]" "SQ[+ +,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(-1:J)]" "MATCHLOC[0:1]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test 中文]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Multi Search (Predictive ITU-T) -> Partial match (2)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_SearchOnInputString "IPSTR[Tim 中文]" "SQ[808,EPredictiveItuT,EAlphaSort,5]" "RES[1,(-1:T)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Multi Search (Predictive QWERTY) -> Partial match (2)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_SearchOnInputString "IPSTR[Tim Monk]" "SQ[5 5,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(-1:T)]" "MATCHLOC[0:1]"
+//api TC_DEA_SearchOnInputString "IPSTR[Tim Monk]" "SQ[5 5,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(-1:T)]" "MATCHLOC[0:1]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test 中文]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Empty String (Predictive ITU-T) -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api SearchOnInputString "IPSTR[]" "SQ[23,EPredictiveItuT,EPatternSort,5]" "RES[0,]" "MATCHLOC[]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title IS: Only spaces string (Predictive ITU-T)- No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api SearchOnInputString "IPSTR[   ]" "SQ[23,EPredictiveItuT,EPatternSort,5]" "RES[0,]" "MATCHLOC[]"
+delete api
+[Endtest]
+
+
+//------------------------------------------------------------------------------
+//					SearchLookupMatchString ("LM")
+//------------------------------------------------------------------------------
+
+//******************************************************************************
+[Test]
+title LM: Trivial (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_SearchLookupMatchString "IPSTR[Abc Bc 123 c]" "SQ[222022,EPredictiveItuT,EPatternSort,5]" "RESSTR[ABC BC]"
+delete api
+[Endtest]
+
+//******************************************************************************
+[Test]
+title LM: Trivial (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_SearchLookupMatchString "IPSTR[Aa@ @A 123 a]" "SQ[aaa aa,EPredictiveQwerty,EPatternSort,5]" "RESSTR[Aa@ @A]"
+//api TC_DEA_SearchLookupMatchString "IPSTR[Ll* *L 123 l]" "SQ[lll ll,EPredictiveQwerty,EPatternSort,5]" "RESSTR[Ll* *L]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+//******************************************************************************
+[Test]
+title LM: Single backtrack (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_SearchLookupMatchString "IPSTR[Abc Bc 123 c]" "SQ[220222,EPredictiveItuT,EPatternSort,5]" "RESSTR[ABC BC]"
+delete api
+[Endtest]
+
+//******************************************************************************
+[Test]
+title LM: Single backtrack (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_SearchLookupMatchString "IPSTR[Aa@ @A 123 a]" "SQ[aa aaa,EPredictiveQwerty,EPatternSort,5]" "RESSTR[@A Aa@]"
+//api TC_DEA_SearchLookupMatchString "IPSTR[Ll* *L 123 l]" "SQ[ll lll,EPredictiveQwerty,EPatternSort,5]" "RESSTR[*L Ll*]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+//******************************************************************************
+[Test]
+title LM: Double backtrack (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_SearchLookupMatchString "IPSTR[Abc Bc 123 c]" "SQ[20220222,EPredictiveItuT,EPatternSort,5]" "RESSTR[ABC BC C]"
+delete api
+[Endtest]
+
+//******************************************************************************
+[Test]
+title LM: Double backtrack (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_SearchLookupMatchString "IPSTR[Aa@ @A 123 a]" "SQ[a aa aaa,EPredictiveQwerty,EPatternSort,5]" "RESSTR[a @A Aa@]"
+//api TC_DEA_SearchLookupMatchString   "IPSTR[Ll* *L 123 l]" "SQ[l ll lll,EPredictiveQwerty,EPatternSort,5]" "RESSTR[l *L Ll*]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+//******************************************************************************
+[Test]
+title LM: Spaces in query and in result (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_SearchLookupMatchString "IPSTR[Abc Bc 123 中文]" "SQ[ 22 1 2 ,EPredictiveItuT,EPatternSort,5]" "RESSTR[AB B 1]"
+delete api
+[Endtest]
+
+//******************************************************************************
+[Test]
+title LM: Spaces in query and in result (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_SearchLookupMatchString "IPSTR[Aa@ @A 123 a]" "SQ[ aa q a ,EPredictiveQwerty,EPatternSort,5]" "RESSTR[ Aa 1 @ ]"
+//api TC_DEA_SearchLookupMatchString "IPSTR[Ll* *L 123 l]" "SQ[ ll q l ,EPredictiveQwerty,EPatternSort,5]" "RESSTR[ Ll 1 * ]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+//******************************************************************************
+[Test]
+title LM: Not matched (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_SearchLookupMatchString "IPSTR[中文 陈二 123 c]" "SQ[2222,EPredictiveItuT,EPatternSort,5]" "RESSTR[]"
+delete api
+[Endtest]
+
+//******************************************************************************
+[Test]
+title LM: Not matched (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_SearchLookupMatchString "IPSTR[Aa@ @A 123 a]" "SQ[aaaa,EPredictiveQwerty,EPatternSort,5]" "RESSTR[]"
+//api TC_DEA_SearchLookupMatchString "IPSTR[Ll* *L 123 l]" "SQ[llll,EPredictiveQwerty,EPatternSort,5]" "RESSTR[]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test 中文]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+//------------------------------------------------------------------------------
+//					GetAllContents ("AC")
+//------------------------------------------------------------------------------
+
+
+//******************************************************************************
+[Test]
+title AC: Get All contacts in the phonebook
+create PsClientTestSuite api
+api WriteTitleToLog
+api GetAllContents "URI[cntdb:\/\/c:contacts.cdb]" "RES[16,(FN:伟$,LN:开,CN:Finland)(FN:峰峰,LN:K,CN:Nokia)(FN:共鹏,LN:周,CN:TaiWan)(FN:利 华,LN:联 合,CN:美国)(FN:我 是 谁 娃 炅,LN:新年,CN:Nokia)(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)(FN:男,LN:虎,CN:Nokia)(FN:楚平,LN:人,CN:Nokia)(FN:任,LN:出凭,CN:Nokia)(FN:金,LN:+勇,CN:Nokia)(FN:@博 four,LN:!five)(FN:mahesh,LN:doraiswamy,CN:Nokia)(FN:0抓,LN:0图,CN:0Sam)(FN:什么,LN:打,CN:Nokia)(FN:福气,LN:钱,CN:Nokia)(FN:mno,LN:同学家,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title AC: Get All contacts - Wrong URI -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api GetAllContents "URI[cntdb:\/\/c:wrongcontacts.cdb]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//------------------------------------------------------------------------------
+//					TestSearchingInCache ("CS")
+//------------------------------------------------------------------------------
+
+
+//******************************************************************************
+[Test]
+title CS: Search by FirstName (Predictive Default)
+create PsClientTestSuite api
+api WriteTitleToLog
+// 5.0: 3x11 Qwerty is default keyboard for N97
+// 9.2: ITU-T is default keyboard if physical keyboard is not present
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[!@H3/#,EPredictiveDefaultKeyboard,EAlphaSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[)aH3s-,EPredictiveDefaultKeyboard,EAlphaSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
+api TC_N00_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[934,EPredictiveDefaultKeyboard,EAlphaSort,5]" "RES[1,(FN:伟$,LN:开,CN:Finland)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search by FirstName (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[33643364,EPredictiveItuT,EAlphaSort,5]" "RES[1,(FN:峰峰,LN:K,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search by FirstName (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[!@H3/#,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[)aH3s-,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search by FirstName (Non-predictive)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[fengfeng,ENonPredictive,EPatternSort,5]" "RES[1,(FN:峰峰,LN:K,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search by FirstName (Mixed Default)
+create PsClientTestSuite api
+api WriteTitleToLog
+// 5.0: 3x11 Qwerty is default keyboard for N97
+// 9.2: ITU-T is default keyboard if physical keyboard is not present
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[!@h3,ddnd,EPatternSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[)ah3,ddnd,EPatternSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
+api TC_N00_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[33ng,ddnn,EPatternSort,5]" "RES[1,(FN:峰峰,LN:K,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search by FirstName (Mixed ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[f3n4,nini,EPatternSort,5]" "RES[1,(FN:峰峰,LN:K,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search by FirstName (Mixed QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[!@h3,qqnq,EPatternSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[)ah3,qqnq,EPatternSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search by FirstName (Predictive ITU-T and QWERTY) - Double Keyboard
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[!2H37#,qiqiiq,EAlphaSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[)2H37-,qiqiiq,EAlphaSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search by LastName (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[9468,EPredictiveItuT,EAlphaSort,5]" "RES[1,(FN:共鹏,LN:周,CN:TaiWan)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search by LastName (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[-94@8/2,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[d94a8s2,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search by LastName (Non-predictive)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[zhou,ENonPredictive,EPatternSort,8]" "RES[1,(FN:共鹏,LN:周,CN:TaiWan)]"
+delete api
+[Endtest]
+
+
+//****************************************************************************
+[Test]
+title CS: Search by LastName (Mixed ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[z4o8,nini,EAlphaSort,5]" "RES[1,(FN:共鹏,LN:周,CN:TaiWan)]"
+delete api
+[Endtest]
+
+
+[Test]
+title CS: Search by LastName (Mixed QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[ve:;7,nnqqq,EAlphaSort,5]" "RES[1,(FN:ravi kiran,LN:velkud,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[ve*#7,nnqqq,EAlphaSort,5]" "RES[1,(FN:ravi kiran,LN:velkud,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search by CompanyName (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[824926,EPredictiveItuT,EAlphaSort,5]" "RES[1,(FN:共鹏,LN:周,CN:TaiWan)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search by CompanyName (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[!9594,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:chiru,LN:devi,CN:motorola)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[)9594,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:chiru,LN:devi,CN:motorola)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search by CompanyName (Non-predictive)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[taiw,ENonPredictive,EPatternSort,8]" "RES[1,(FN:共鹏,LN:周,CN:TaiWan)]"
+delete api
+[Endtest]
+
+
+//****************************************************************************
+[Test]
+title CS: Search by CompanyName (Mixed ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[82iwa6,iinnni,EAlphaSort,5]" "RES[1,(FN:共鹏,LN:周,CN:TaiWan)]"
+delete api
+[Endtest]
+
+
+//****************************************************************************
+[Test]
+title CS: Search by CompanyName (Mixed QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[mo594,nnqqq,EAlphaSort,5]" "RES[1,(FN:chiru,LN:devi,CN:motorola)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[mo594,nnqqq,EAlphaSort,5]" "RES[1,(FN:chiru,LN:devi,CN:motorola)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multiple words contact (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[482,EPredictiveItuT,EPatternSort,5]" "RES[1,(FN:利 华,LN:联 合,CN:美国)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multiple words contact (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[;84@,EPredictiveQwerty,EPatternSort,5]" "RES[1,(FN:ravi kiran,LN:velkud,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[#84a,EPredictiveQwerty,EPatternSort,5]" "RES[1,(FN:ravi kiran,LN:velkud,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multiple (very many) words contact (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[54664,EPredictiveItuT,EAlphaSort,5]" "RES[1,(FN:我 是 谁 娃 炅,LN:新年,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multiple (very many) words contact (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[*@6,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+a6,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multiple words contact with same initials (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[5727,EPredictiveItuT,EPatternSort,5]" "RES[1,(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multiple words contact with same initials (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[:0%/,EPredictiveQwerty,EPatternSort,5]" "RES[1,(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[*0cs,EPredictiveQwerty,EPatternSort,5]" "RES[1,(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multiple words contact with same initials (Non-predictive)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[lpcs,ENonPredictive,EAlphaSort,5]" "RES[1,(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multiple words contact with same initials (Mixed ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[l7c7,nini,EPatternSort,5]" "RES[1,(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multiple words contact with same initials (Mixed QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[l0c/,nqnq,EPatternSort,5]" "RES[1,(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[l0cs,nqnq,EPatternSort,5]" "RES[1,(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[626048,EPredictiveItuT,EAlphaSort,5]" "RES[1,(FN:男,LN:虎,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[=# *;,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:ghi,LN:jkl,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[G- +#,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:ghi,LN:jkl,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Predictive ITU-T) - Space as sep
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[736 2487,EPredictiveItuT,EAlphaSort,5]" "RES[2,(FN:楚平,LN:人,CN:Nokia)(FN:任,LN:出凭,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Predictive QWERTY) - Space as sep
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[5 *9,EPredictiveQwerty,EAlphaSort,5]" "RES[2,(FN:Tim,LN:Jones,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[5 +9,EPredictiveQwerty,EAlphaSort,5]" "RES[2,(FN:Tim,LN:Jones,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Predictive ITU-T) - 0 as sep
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[73602487,EPredictiveItuT,EAlphaSort,5]" "RES[2,(FN:楚平,LN:人,CN:Nokia)(FN:任,LN:出凭,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Predictive QWERTY) - 0 as sep
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[50*9,EPredictiveQwerty,EAlphaSort,5]" "RES[0,]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[50+9,EPredictiveQwerty,EAlphaSort,5]" "RES[0,]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Predictive ITU-T) - 0 and space as sep
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[7360 2487,EPredictiveItuT,EAlphaSort,5]" "RES[2,(FN:楚平,LN:人,CN:Nokia)(FN:任,LN:出凭,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Predictive QWERTY) - 0 and space as sep
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[50 *9,EPredictiveQwerty,EAlphaSort,5]" "RES[0,]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[50 +9,EPredictiveQwerty,EAlphaSort,5]" "RES[0,]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Non-predictive) - Space as sep
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[ren chup,ENonPredictive,EAlphaSort,5]" "RES[2,(FN:楚平,LN:人,CN:Nokia)(FN:任,LN:出凭,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Non-predictive) - 0 as NON sep (Qwerty 0)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j0t,ENonPredictive,EAlphaSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Mixed ITU-T) - Space as sep
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[n2 4u,ninin,EPatternSort,5]" "RES[1,(FN:男,LN:虎,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Mixed QWERTY) - Space as sep
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j9 5i,nqnqn,EPatternSort,5]" "RES[1,(FN:Tim,LN:Jones,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j9 5i,nqnqn,EPatternSort,5]" "RES[1,(FN:Tim,LN:Jones,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Mixed ITU-T) - 0 as sep
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[n204u,niiin,EAlphaSort,5]" "RES[1,(FN:男,LN:虎,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Mixed QWERTY) - 0 as sep
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j905i,nqqqn,EAlphaSort,5]" "RES[0,]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j905i,nqqqn,EAlphaSort,5]" "RES[0,]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Mixed ITU-T) - 0 as NON sep (Qwerty 0)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[n2049,ninin,EAlphaSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Mixed QWERTY) - 0 as NON sep (Qwerty 0)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j905i,nqnqn,EAlphaSort,5]" "RES[0,]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j905i,nqnqn,EAlphaSort,5]" "RES[0,]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Mixed ITU-T) - 0 and space as sep
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[n20 4u,niiiin,EAlphaSort,5]" "RES[1,(FN:男,LN:虎,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Mixed QWERTY) - 0 and space as sep
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j90 5i,nqqqqn,EAlphaSort,5]" "RES[0,]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[j90 5i,nqqqqn,EAlphaSort,5]" "RES[0,]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Predictive ITU-T) -> more than one result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[73602487,EPredictiveItuT,EPatternSort,5]" "RES[2,(FN:楚平,LN:人,CN:Nokia)(FN:任,LN:出凭,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Predictive QWERTY) -> more than one result
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[& 4,EPredictiveQwerty,EPatternSort,5]" "RES[2,(FN:ravi kiran,LN:velkud,CN:Nokia)(FN:4four,LN:&ampli,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[( 4,EPredictiveQwerty,EPatternSort,5]" "RES[2,(FN:ravi kiran,LN:velkud,CN:Nokia)(FN:4four,LN:&ampli,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search Contact starting with + (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+9664,EPredictiveItuT,EAlphaSort,5]" "RES[1,(FN:金,LN:+勇,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search Contact starting with + (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+@::3?,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:+allen,LN:good,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+a**3(,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:+allen,LN:good,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search contact starting with + (Non-predictive)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+yong,ENonPredictive,EPatternSort,5]" "RES[1,(FN:金,LN:+勇,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search with + (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+0+,EPredictiveItuT,EAlphaSort,5]" "RES[1,(FN:@博 four,LN:!five)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search with + (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+ +,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:@ravi four,LN:!belkud five)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+ 5,EPredictiveQwerty,EAlphaSort,5]" "RES[2,(FN:Tim,LN:Jones,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Predictive ITU-T) -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[239098,EPredictiveItuT,EAlphaSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Predictive ITU-T) - Query with more than 2 words
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[73602487066,EPredictiveItuT,EAlphaSort,5]" "RES[2,(FN:楚平,LN:人,CN:Nokia)(FN:任,LN:出凭,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Predictive QWERTY) - Query with more than 2 words
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[5 *9 ?,EPredictiveQwerty,EAlphaSort,5]" "RES[2,(FN:Tim,LN:Jones,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[5 +9 (,EPredictiveQwerty,EAlphaSort,5]" "RES[2,(FN:Tim,LN:Jones,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search (Predictive ITU-T) -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[736024870699,EPredictiveItuT,EAlphaSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search (Non-predictive) -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[deepakrsrs,ENonPredictive,EPatternSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search (Mixed ITU-T) -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[dee789srs,nnniiinnn,EAlphaSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Predictive ITU-T) -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[4242 3262374,EPredictiveItuT,EPatternSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Non-predictive) -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[deepa krsrs,ENonPredictive,EAlphaSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Mixed ITU-T) -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[dee78 9srs,nnniiiinnn,EPatternSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Wrong URI (Predictive ITU-T) -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:Wronguricontacts.cdb]" "SQ[2,EPredictiveItuT,EAlphaSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Wrong URI (Non-predictive) -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:Wronguricontacts.cdb]" "SQ[z,ENonPredictive,EAlphaSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Wrong URI (Mixed ITU-T) -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:Wronguricontacts.cdb]" "SQ[dee7809srs,nnniiiinnn,EPatternSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Filter Display Fields (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "DISP[28]" "SQ[624374,EPredictiveItuT,EPatternSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Filter Display Fields (Non-predictive)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "DISP[28]" "SQ[mahesh,ENonPredictive,EPatternSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Filter Display Fields (Mixed ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "DISP[28]" "SQ[ma43sh,nniinn,EPatternSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Multi Search (Non-predictive) - Filter Display Fields
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "DISP[28]" "SQ[ravi velkud,ENonPredictive,EAlphaSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Groups Search (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb]" "SQ[8664983,EPredictiveItuT,EPatternSort,5]" "RES[1,(FN:同学)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Groups Search (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb]" "SQ[5#3=497,EPredictiveQwerty,EPatternSort,5]" "RES[1,(FN:TheGroup)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb]" "SQ[5-3G497,EPredictiveQwerty,EPatternSort,5]" "RES[1,(FN:TheGroup)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Groups Search (Non-predictive)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb]" "SQ[Tongx,ENonPredictive,EPatternSort,5]" "RES[1,(FN:同学)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Groups Search (Mixed ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb]" "SQ[866g9u3,iiinini,EAlphaSort,5]" "RES[1,(FN:同学)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Groups Search (Mixed QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb]" "SQ[5#3g4o7,qqqnqnq,EAlphaSort,5]" "RES[1,(FN:TheGroup)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb]" "SQ[5-3g4o7,qqqnqnq,EAlphaSort,5]" "RES[1,(FN:TheGroup)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search in more than one group -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb?id=3221,cntdb:\/\/c:contacts.gdb?id=1132]" "SQ[624374,EPredictiveItuT,EPatternSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search in non-existing group ID -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingInCache "URI[cntdb:\/\/c:contacts.gdb?id=3221]" "SQ[624374,EPredictiveItuT,EPatternSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search special chars - Pattern Sort
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[1,EPredictiveItuT,EPatternSort,5]" "RES[3,(FN:@博 four,LN:!five)(FN:伟$,LN:开,CN:Finland)(FN:金,LN:+勇,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search special chars - Pattern Sort
+create PsClientTestSuite api
+api WriteTitleToLog
+// The following test is not really applicable test for non-ITUT keyboard
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[! @,EPredictiveQwerty,EPatternSort,5]" "RES[1,(FN:@ravi four,LN:!belkud five)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[! @,EPredictiveQwerty,EPatternSort,5]" "RES[1,(FN:@ravi four,LN:!belkud five)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search special chars (Predictive ITU-T) - Alpha Sort
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[1,EPredictiveItuT,EAlphaSort,5]" "RES[3,(FN:@博 four,LN:!five)(FN:伟$,LN:开,CN:Finland)(FN:金,LN:+勇,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search special chars (Predictive QWERTY) - Alpha Sort
+create PsClientTestSuite api
+api WriteTitleToLog
+// The following test is not really applicable test for non-ITUT keyboard
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[! @,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:@ravi four,LN:!belkud five)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[! @,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:@ravi four,LN:!belkud five)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search contact starting with 0 (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[09482,EPredictiveItuT,EAlphaSort,5]" "RES[1,(FN:0抓,LN:0图,CN:0Sam)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search contact starting with 0 (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[0?8%,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:0Nick,LN:0Jack,CN:0Sam)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[0(8c,EPredictiveQwerty,EAlphaSort,5]" "RES[1,(FN:0Nick,LN:0Jack,CN:0Sam)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search in multiple data stores (Predictive ITU-T)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb,cntdb:\/\/c:contacts.gdb]" "SQ[8664983,EPredictiveItuT,EAlphaSort,5]" "RES[2,(FN:同学)(FN:mno,LN:同学家,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search in multiple data stores (Predictive QWERTY)
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb,cntdb:\/\/c:contacts.gdb]" "SQ[5#3=,EPredictiveQwerty,EAlphaSort,5]" "RES[2,(FN:TheGroup)(FN:mno,LN:pqr TheGr,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb,cntdb:\/\/c:contacts.gdb]" "SQ[5-3G,EPredictiveQwerty,EAlphaSort,5]" "RES[2,(FN:TheGroup)(FN:mno,LN:pqr TheGr,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search (Predictive ITU-T) - Alpha Sort -> Truncate result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[5,EPredictiveItuT,EAlphaSort,3]" "RES[3,(FN:伟$,LN:开,CN:Finland)(FN:利 华,LN:联 合,CN:美国)(FN:mno,LN:同学家,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search (Predictive QWERTY) - Alpha Sort -> Truncate result
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[*,EPredictiveQwerty,EAlphaSort,3]" "RES[3,(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)(FN:ghi,LN:jkl,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+,EPredictiveQwerty,EAlphaSort,3]" "RES[3,(FN:+allen,LN:good,CN:Nokia)(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)(FN:ghi,LN:jkl,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search (Predictive ITU-T) - Pattern Sort -> Truncate result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TC_ITU_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[5,EPredictiveItuT,EPatternSort,3]" "RES[3,(FN:伟$,LN:开,CN:Finland)(FN:利 华,LN:联 合,CN:美国)(FN:mno,LN:同学家,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Search (Predictive QWERTY) - Pattern Sort -> Truncate result
+create PsClientTestSuite api
+api WriteTitleToLog
+//api TC_N97_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[*,EPredictiveQwerty,EPatternSort,3]" "RES[3,(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)(FN:ghi,LN:jkl,CN:Nokia)(FN:John,LN:Tom,CN:Nokia)]"
+//api TC_DEA_TestSearchingInCache "URI[cntdb:\/\/c:contacts.cdb]" "SQ[+,EPredictiveQwerty,EPatternSort,3]" "RES[3,(FN:+allen,LN:good,CN:Nokia)(FN:a b c d e f g Jay,LN:L Gee,CN:Nokia India)(FN:ghi,LN:jkl,CN:Nokia)]"
+api TC_N00_SearchOnInputString "IPSTR[Fake_Test]" "SQ[F,ENonPredictive,EAlphaSort,5]" "RES[1,(-1:F)]" "MATCHLOC[0:1]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title CS: Cancel search 
+create PsClientTestSuite api
+api WriteTitleToLog
+api CancelSearch "URI[cntdb:\/\/c:contacts.cdb]" "SQ[624374,EPredictiveItuT,EAlphaSort,5]" "RES[1,(FN:mahesh,LN:doraiswamy,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//------------------------------------------------------------------------------
+//					TestSearchingWithInGroup ("GS")
+//------------------------------------------------------------------------------
+
+
+//******************************************************************************
+[Test]
+title GS: Search FirstName in group (Non-predictive)
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingWithInGroup "SrchInGroup[同学]" "SQ[dashenme,ENonPredictive,EAlphaSort,5]" "RES[1,(FN:什么,LN:打,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title GS: Search in group - Empty Query
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingWithInGroup "SrchInGroup[同学]" "SQ[,ENonPredictive,EAlphaSort,5]" "RES[3,(FN:什么,LN:打,CN:Nokia)(FN:福气,LN:钱,CN:Nokia)(FN:mno,LN:同学家,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title GS: Search in group (Non-predictive) - Empty Query -> No result
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingWithInGroup "SrchInGroup[同学]" "SQ[afdsbc,ENonPredictive,EPatternSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title GS: Search in non-existing group
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSearchingWithInGroup "SrchInGroup[TheNonExistantGroup]" "SQ[abc,ENonPredictive,EAlphaSort,5]" "RES[0,]"
+delete api
+[Endtest]
+
+
+//------------------------------------------------------------------------------
+//					Adaptive Grid ("AG")
+//------------------------------------------------------------------------------
+
+
+//******************************************************************************
+//[Test]
+//title AG: Get Adaptive Grid - With Company Name
+//create PsClientTestSuite api
+//api WriteTitleToLog
+//api CheckAdaptiveString "URI[cntdb:\/\/c:contacts.cdb]" "IPSTR[]" "BOOL[ETrue]" "RESSTR[!&+014@ABCDEFGIJKLMNPRTVY���]"
+//delete api
+//[Endtest]
+
+
+//******************************************************************************
+//[Test]
+//title AG: Get Adaptive Grid - Without Company Name
+//create PsClientTestSuite api
+//api WriteTitleToLog
+//api CheckAdaptiveString "URI[cntdb:\/\/c:contacts.cdb]" "IPSTR[]" "BOOL[EFalse]" "RESSTR[!&+014@ABCDEFGJKLMPRTVY��]"
+//delete api
+//[Endtest]
+
+
+//------------------------------------------------------------------------------
+//					Miscellaneous ("Mi")
+//------------------------------------------------------------------------------
+
+
+//******************************************************************************
+[Test]
+title Mi: Check Caching status
+create PsClientTestSuite api
+api WriteTitleToLog
+api CheckCachingStatus
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title Mi: Check Version
+create PsClientTestSuite api
+api WriteTitleToLog
+api CheckVersion
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title Mi: Remove Observer
+create PsClientTestSuite api
+api WriteTitleToLog
+api RemoveObserver "URI[cntdb:\/\/c:contacts.cdb]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title Mi: Marked contacts
+create PsClientTestSuite api
+api WriteTitleToLog
+api AddMarkedContactsTest "URI[cntdb:\/\/c:contacts.cdb]" "SQ[624374,EPredictiveItuT,EAlphaSort,25]" "RES[16,(FN:伟$,LN:开,CN:Finland)(FN:峰峰,LN:K,CN:Nokia)(FN:共鹏,LN:周,CN:TaiWan)(FN:利 华,LN:联 合,CN:美国)(FN:我 是 谁 娃 炅,LN:新年,CN:Nokia)(FN:Lpcsillet,LN:Lpcsucy,CN:Lpcsush)(FN:男,LN:虎,CN:Nokia)(FN:楚平,LN:人,CN:Nokia)(FN:任,LN:出凭,CN:Nokia)(FN:金,LN:+勇,CN:Nokia)(FN:@博 four,LN:!five)(FN:mahesh,LN:doraiswamy,CN:Nokia)(FN:0抓,LN:0图,CN:0Sam)(FN:什么,LN:打,CN:Nokia)(FN:福气,LN:钱,CN:Nokia)(FN:mno,LN:同学家,CN:Nokia)]"
+delete api
+[Endtest]
+
+
+//------------------------------------------------------------------------------
+//					TestSortOrder ("SO")
+//------------------------------------------------------------------------------
+
+
+//******************************************************************************
+[Test]
+title SO: Change Sort Order test 1
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSortOrder "URI[cntdb:\/\/c:contacts.cdb]" "SORTORDER[6,2,37]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title SO: Change Sort Order test 2
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSortOrder "URI[cntdb:\/\/c:contacts.cdb]" "SORTORDER[6,2,37,22]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title SO: Change Sort Order - More than 10 keys
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSortOrder "URI[cntdb:\/\/c:contacts.cdb]" "SORTORDER[1,2,3,4,5,6,7,8,9,10,11]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title SO: Change Sort Order - Same sort order
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSortOrder "URI[cntdb:\/\/c:contacts.cdb]" "SORTORDER[]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title SO: Change Sort Order on a group URI
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSortOrderErrCaseL "URI[cntdb:\/\/c:contacts.gdb?id=3221]" "SORTORDER[6,2,37]"
+delete api
+[Endtest]
+
+
+//******************************************************************************
+[Test]
+title SO: Change Sort Order on a wrong group URI
+create PsClientTestSuite api
+api WriteTitleToLog
+api TestSortOrderErrCaseL "URI[cntdb:\/\/c:wrongcontactsuri.cdb]" "SORTORDER[6,2,37]"
+delete api
+[Endtest]
+
+
+//------------------------------------------------------------------------------
+//					ShutDown Server ("SD")
+//------------------------------------------------------------------------------
+
+
+//******************************************************************************
+[Test]
+title SD: Shut Down the Server
+create PsClientTestSuite api
+api WriteTitleToLog
+api ShutDown
+delete api
+[Endtest]
+
+
+//------------------------------------------------------------------------------
+//					END OF FILE
+//------------------------------------------------------------------------------
--- a/contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/group/PsClientTestSuite.mmp	Tue Sep 14 20:54:53 2010 +0300
+++ b/contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/group/PsClientTestSuite.mmp	Wed Sep 15 11:56:55 2010 +0300
@@ -49,7 +49,8 @@
 LIBRARY         VPbkEng.lib
 LIBRARY         ecom.lib
 LIBRARY         flogger.lib
-LIBRARY		bafl.lib
+LIBRARY	        bafl.lib 
+LIBRARY         charconv.lib 
 
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/group/PsClientTestSuitePRC.pkg	Wed Sep 15 11:56:55 2010 +0300
@@ -0,0 +1,38 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:
+;
+;Language - standard language definitions
+&EN
+
+; standard SIS file header
+#{"Ps Client API TestSuite"},(0x2000B5BB),1,0,0
+
+;Supports Series 60 v 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+;Localised Vendor name
+%{"Nokia"}
+
+;Unique Vendor name
+:"Nokia"
+
+; PS Client API Test Suite  files to be installed
+"\epoc32\release\armv5\urel\PsClientTestSuite.dll"-"!:\sys\bin\PsClientTestSuite.dll"
+
+; The configuration file for the test cases
+"..\conf\PsClientTestSuitePRC.cfg"-"!:\testframework\PsClientTestSuite.cfg"
+
+; The test framework initilization file
+"..\init\PsClientTestSuite.ini"-"!:\testframework\PsClientTestSuite.ini"
\ No newline at end of file
--- a/contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/inc/TestSuiteInputData.h	Tue Sep 14 20:54:53 2010 +0300
+++ b/contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/inc/TestSuiteInputData.h	Wed Sep 15 11:56:55 2010 +0300
@@ -279,6 +279,7 @@
 	    void ParseInputForSearchWithinGroupL(TDesC& aInput);
 		void ParseInputForSortOrderL(TDesC& aInput);
 		TInt GetFieldIdFromVpbkIdentifierL(TDesC& aIdentifierAsString);
+		void ConvUtf2UniL( const TDesC& aOriginal, TDes& aRes );
 
 private: // data
 
--- a/contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/src/TestSuiteInputData.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/src/TestSuiteInputData.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -22,6 +22,24 @@
 #include "pstestcontactshandler.h"
 #include "psclienttestsuitedefs.h"
 #include <vpbkeng.rsg>
+#include <f32file.h>
+#include <CHARCONV.H>
+
+void CTestSuiteInputData::ConvUtf2UniL( const TDesC& aOriginal, TDes& aRes )
+    {
+    HBufC8* buf8 = HBufC8::NewLC( aOriginal.Length() * 2 );
+    buf8->Des().Copy( aOriginal );
+    TPtrC8 str = buf8->Des();
+
+    HBufC* InfoText = CnvUtfConverter::ConvertToUnicodeFromUtf8L( str );
+    CleanupStack::PushL( InfoText );
+    TPtr16 ptr = InfoText->Des();
+
+    aRes.Zero();
+    aRes.Copy( ptr );
+
+    CleanupStack::PopAndDestroy( 2 );
+    }
 
 // ============================== MEMBER FUNCTIONS ============================
 
@@ -422,9 +440,14 @@
             j++;
 
         TPtrC16 dataPtr = aInput.Mid(Startpos ,j - Startpos);	
-
+        
+        HBufC* buf = dataPtr.AllocLC();
+        TPtr uniPtr = buf->Des();
+        ConvUtf2UniL( dataPtr, uniPtr);
+        
         // Add data to the class
-        tempcacheData->data.Append(dataPtr.AllocL());
+        tempcacheData->data.Append(uniPtr.AllocL());
+        CleanupStack::PopAndDestroy();
 
         commaPos = j ;  
         j++;   
@@ -548,12 +571,16 @@
             j++;
 			      
         TPtrC16 dataPtr = aInput.Mid(Startpos ,j - Startpos);	
+        HBufC* buf = dataPtr.AllocLC();
+        TPtr uniPtr = buf->Des();
+        ConvUtf2UniL( dataPtr, uniPtr);
 			
         // Add data to the output
-        HBufC* tempData = dataPtr.AllocL();
+        HBufC* tempData = uniPtr.AllocL();
         aSeparatedData.Append(tempData);
         SeparatorPos = j;  
         j++;   
+        CleanupStack::PopAndDestroy();
 	}
 }
 
@@ -846,7 +873,11 @@
 // -----------------------------------------------------------------------------
 void CTestSuiteInputData::ParseInputInputSearchStringL(TDesC& aInput)
 {
-	iInputSearchString = aInput.AllocL();
+	HBufC* buf = aInput.AllocLC();
+	TPtr uniPtr = buf->Des();
+	ConvUtf2UniL( aInput, uniPtr);
+	iInputSearchString = uniPtr.AllocL();
+	CleanupStack::PopAndDestroy();
 }
 
 // -----------------------------------------------------------------------------
@@ -950,8 +981,13 @@
 	HBufC* temp2 = aInput.Right(len - 1).AllocL();
 	ParseInputForContactsDataL(*temp2,0);
 	
+    HBufC* buf = gropName->AllocLC();
+    TPtr uniPtr = buf->Des();
+    ConvUtf2UniL( gropName->Des(), uniPtr);
+	
 	//Add the group
-	iContactHandler->AddGroupL(*gropName);
+	iContactHandler->AddGroupL(*buf);
+	CleanupStack::PopAndDestroy();
 	CActiveScheduler :: Start();
 	
 	//Create Contacts 
@@ -964,7 +1000,11 @@
 // -----------------------------------------------------------------------------
 void CTestSuiteInputData::ParseInputForSearchWithinGroupL(TDesC& aInput)
 {
-	iGroupToBeSearched = aInput.AllocL();	
+	HBufC* buf = aInput.AllocLC();
+	TPtr uniPtr = buf->Des();
+	ConvUtf2UniL( aInput, uniPtr);
+	iGroupToBeSearched = uniPtr.AllocL();
+	CleanupStack::PopAndDestroy();
 }
 
 // -----------------------------------------------------------------------------
--- a/contacts_pub/phonebook_data_addedit_ui_api/tsrc/bc/src/BCTestPbkDataAddEditBlocks.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/contacts_pub/phonebook_data_addedit_ui_api/tsrc/bc/src/BCTestPbkDataAddEditBlocks.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -384,8 +384,8 @@
     
     _LIT( KPhoneNumber, "+358401234567" );
     TInt commandId = TPbkDataSaveCommandId( EPbkCmdDataSaveAddToExisting );
-    TBool added = dataSaveAppUi->HandleCommandL( commandId, *fields, KPhoneNumber );
-    ASSERT(added );
+    TRAPD( err, dataSaveAppUi->HandleCommandL( commandId, *fields, KPhoneNumber ) );
+    ASSERT(err == KErrNone);
     
     CleanupStack::PopAndDestroy( fields );
     CleanupStack::PopAndDestroy( dataSaveAppUi );
--- a/logsui/AppSrc/CLogsDetailView.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/logsui/AppSrc/CLogsDetailView.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -284,6 +284,7 @@
         case ( R_COMMON_SEND_MESSAGE_SUBMENU ):
         case ( R_COMMON_POC_SUBMENU ):
         case ( R_COMMON_CALLUI_SUBMENU ):
+        case ( R_COMMON_SHOW_MY_ADDRESS_MENU ):
             {
             SetMenuItemsItemSpecificProperty( aMenuPane, EFalse );
             }
--- a/logsui/AppSrc/CLogsRecentListControlContainer.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/logsui/AppSrc/CLogsRecentListControlContainer.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -123,6 +123,14 @@
      MakeEmptyTextListBoxL( iListBox, EmptyListboxResourceL() );
     iListBox->Model()->SetItemTextArray( iAdapter );
     
+    // Fetch data for extension
+    if( iView->CurrentModel()->Count() > 0 )
+        {
+        iControlExtension->HandleAdditionalData( 
+                    *( iView->CurrentModel() ), 
+                    *iListBox );
+        }
+    
     MakeScrollArrowsL( iListBox );
 
     //Create recent list view tab group (Logs.rss)
--- a/logsui/AppSrc/CLogsRecentListView.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/logsui/AppSrc/CLogsRecentListView.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -879,8 +879,8 @@
                 iFocusChangeControl = ELogsNoChange;
                 }
             }
-        // Sure "ClearMissedCallNotificationsL" is called.
-        ClearMissedCallNotificationsL();
+        // Sure "ClearMissedCallNotifications" is called.
+        ClearMissedCallNotifications();
         
         RemoveInputBlocker(); //just in case
         }                            
--- a/phonebookengines/contactsmodel/groupsql/app-engines_cntmodel.mrp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookengines/contactsmodel/groupsql/app-engines_cntmodel.mrp	Wed Sep 15 11:56:55 2010 +0300
@@ -4,12 +4,6 @@
 
 exports	\sf\app\contacts\phonebookengines\contactsmodel\groupsql
 
--export_file	\sf\app\contacts\phonebookengines\contactsmodel\documentation\contacts_connectivityapi.doc	\epoc32\engdoc\cntmodel\Contacts_ConnectivityAPI.doc
--export_file	\sf\app\contacts\phonebookengines\contactsmodel\documentation\contacts_current_itemapi.doc	\epoc32\engdoc\cntmodel\Contacts_Current_ItemAPI.doc
--export_file	\sf\app\contacts\phonebookengines\contactsmodel\documentation\contacts_group_supportapi.doc	\epoc32\engdoc\cntmodel\Contacts_Group_SupportAPI.DOC
--export_file	\sf\app\contacts\phonebookengines\contactsmodel\documentation\contacts_multiple_templatesapi.doc	\epoc32\engdoc\cntmodel\Contacts_Multiple_TemplatesAPI.doc
--export_file	\sf\app\contacts\phonebookengines\contactsmodel\documentation\contacts_own_card_supportapi.doc	\epoc32\engdoc\cntmodel\Contacts_Own_Card_SupportAPI.doc
--export_file	\sf\app\contacts\phonebookengines\contactsmodel\documentation\contacts_sorting_view_supportapi.doc	\epoc32\engdoc\cntmodel\Contacts_sorting_view_supportAPI.doc
 notes_source	\component_defs\release.src
 
 
--- a/phonebookui/Phonebook2/Application/src/CPbk2AppUi.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/Application/src/CPbk2AppUi.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -572,9 +572,23 @@
 // --------------------------------------------------------------------------
 //
 void CPbk2AppUi::LeavePbkInMemExitL()
-	{
-	PBK2_DEBUG_PRINT(PBK2_DEBUG_STRING("CPbk2AppUi::LeavePbkInMemExitL"));
-	
+    {
+    PBK2_DEBUG_PRINT(PBK2_DEBUG_STRING("CPbk2AppUi::LeavePbkInMemExitL"));
+    
+    TBool dlgOnTop = IsDisplayingMenuOrDialog();
+    // When Phonebook app is to leave in memory with a dialog displaying
+    // on the top of it, an escape key event will be simuliated to notify
+    // the dialog more earlier.
+    if ( dlgOnTop ) 
+        { 
+        TKeyEvent key; 
+        key.iRepeats = 0; 
+        key.iCode = EKeyEscape; 
+        key.iModifiers = 0; 
+        key.iScanCode = EStdKeyNull; 
+        iCoeEnv->SimulateKeyEventL(key, EEventKey); 
+        } 
+
 	// Diasable bring to foreground on view activation event
 	SetCustomControl(1);
 	
--- a/phonebookui/Phonebook2/CommonUI/rss/Pbk2IconInfo.rss	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/CommonUI/rss/Pbk2IconInfo.rss	Wed Sep 15 11:56:55 2010 +0300
@@ -508,6 +508,18 @@
             maskId = qgn_prop_radiobutt_on_mask;
             skinIdMajor = EAknsMajorAvkon;
             skinIdMinor = EAknsMinorQgnPropRadiobuttOn;
+            },
+          PBK2_ICON_INFO
+            {
+            version = 0;
+            pbk2IconInfoId = PHONEBOOK2_ICON_ID
+                 {
+                 ownerUid = KPbk2UID3;
+                 id = EPbk2qgn_prop_phonebook2_unsync;
+                 };
+            mbmFileName = phonebook2_mbm_file_location;
+            iconId = qgn_prop_phonebook2_unsync;
+            maskId = qgn_prop_phonebook2_unsync_mask;
             }
         };
     }
--- a/phonebookui/Phonebook2/GroupExtension/inc/CPguAddMembersCmd.h	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/GroupExtension/inc/CPguAddMembersCmd.h	Wed Sep 15 11:56:55 2010 +0300
@@ -29,6 +29,7 @@
 #include <MPbk2Command.h>
 #include <MVPbkContactSelector.h>
 #include <MPbk2ProcessDecorator.h>
+#include <mpgugroupcmd.h>
 
 // FORWARD DECLARATIONS
 class MPbk2ContactUiControl;
@@ -53,7 +54,8 @@
                           private MVPbkContactViewObserver,
                           private MVPbkContactSelector,
                           private MPbk2ContactRelocatorObserver,
-                          private MPbk2ProcessDecoratorObserver
+                          private MPbk2ProcessDecoratorObserver,
+                          public MPguGroupCmd
     {
     public: // Construction and destruction
 
@@ -72,6 +74,9 @@
          * Destructor.
          */
         ~CPguAddMembersCmd();
+        
+    public: //MPguGroupCmd
+        void Abort();
 
     public: // From MPbk2Command
         void ExecuteLD();
@@ -221,6 +226,7 @@
         TInt iContactsCounter;
         /// Own: Contact 
         MVPbkStoreContact* iContact;
+        TBool iAbort;
     };
 
 #endif // CPGUADDMEMBERSCMD_H
--- a/phonebookui/Phonebook2/GroupExtension/inc/CPguRemoveFromGroupCmd.h	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/GroupExtension/inc/CPguRemoveFromGroupCmd.h	Wed Sep 15 11:56:55 2010 +0300
@@ -28,6 +28,7 @@
 #include <MVPbkSingleContactOperationObserver.h>
 #include <MVPbkContactViewObserver.h>
 #include <MVPbkContactSelector.h>
+#include <mpgugroupcmd.h>
 
 // FORWARD DECLARATIONS
 class MPbk2ContactUiControl;
@@ -97,7 +98,8 @@
         private MVPbkSingleContactOperationObserver,
         private MVPbkContactObserver,
         private MVPbkContactViewObserver,
-        private MProgressDialogCallback
+        private MProgressDialogCallback,
+        public MPguGroupCmd
 
     {
     public: // Construction and destruction
@@ -118,6 +120,9 @@
          */
         ~CPguRemoveFromGroupCmd();
 
+    public: //MPguGroupCmd
+            void Abort();    
+            
     public: // From MPbk2Command
         void ExecuteLD();
         void AddObserver(
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/Phonebook2/GroupExtension/inc/mpgugroupcmd.h	Wed Sep 15 11:56:55 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Phonebook 2 Group Extn command object interface.
+*
+*/
+
+
+#ifndef MPGUGROUPCMD_H
+#define MPGUGROUPCMD_H
+
+// INCLUDES
+#include <e32std.h>
+
+// FORWARD DECLARATIONS
+
+
+// CLASS DECLARATION
+
+/**
+ * Group extention command object interface. 
+ * 
+ * Pbk2 Group Extention cmd's are inherited from this interface
+ * along with MPbk2Command  
+ */
+class MPguGroupCmd
+    {
+    public: // Interface
+
+        /**
+         * Destructor.
+         */
+        virtual ~MPguGroupCmd()
+                {};
+
+        /**
+         * Aborts the Command
+         */
+        virtual void Abort() = 0;
+        
+    };
+
+#endif // MPGUGROUPCMD_H
+
+// End of File
--- a/phonebookui/Phonebook2/GroupExtension/src/CPguAddMembersCmd.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/GroupExtension/src/CPguAddMembersCmd.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -804,6 +804,11 @@
         iState = ECommitingTransaction;
         }
     
+    if ( iAbort )
+        {
+        iState = ECommitingTransaction;
+        }
+    
     IssueRequest();
     }
 
@@ -1017,4 +1022,15 @@
         IssueRequest();
         }
     }
+
+void CPguAddMembersCmd::Abort()
+    {
+    if ( iDecorator )
+        {
+        // iDecorator calls ProcessStopped to end this cmd
+        iDecorator->ProcessStopped();
+        iAbort = ETrue;
+        }
+    }
+
 // End of File
--- a/phonebookui/Phonebook2/GroupExtension/src/CPguGroupMembersView.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/GroupExtension/src/CPguGroupMembersView.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -57,6 +57,8 @@
 #include <CPbk2StoreConfiguration.h>
 #include <MPbk2AppUi.h>
 #include <Pbk2MenuFilteringFlags.hrh>
+#include <CPbk2CommandStore.h>
+#include <CPbk2CommandHandler.h>
 
 // Virtual Phonebook
 #include <MVPbkContactViewBase.h>
@@ -742,6 +744,10 @@
         TBool iStylusPopupMenuLaunched;
         // Ref: Store management ptr
         CPbk2StoreConfiguration* iStoreConf;
+        //OWN: Active scheduler wait for waiting the completion
+        CActiveSchedulerWait    iWait;
+        // Ref: To the command. Doesn't Own.
+        MPguGroupCmd* iCommand;
     };
 
 // --------------------------------------------------------------------------
@@ -1095,6 +1101,12 @@
 CPguGroupMembersView::CGroupMembersAllGroupsReady::
         ~CGroupMembersAllGroupsReady()
     {    
+
+    if( iWait.IsStarted() )
+        {
+        iWait.AsyncStop();  
+        }
+
     iCommandHandler.RemoveMenuCommandObserver( *this );
 
     if ( iStoreConf )
@@ -1441,13 +1453,10 @@
             case EKeyEnter: // FALLTHROUGH
             case EKeyOK:
                 {
+                // The key will be handled by ListBox if there are contacts in this view
                 if ( !ShiftDown(aKeyEvent) ) // pure OK or ENTER key
                     {
-                    if ( iControl->ContactsMarked() && itemSpecEnabled )
-                        {
-                        result = ETrue;
-                        }
-                    else if ( iControl->NumberOfContacts() == 0 )
+                    if ( iControl->NumberOfContacts() == 0 )
                         {
                         result = ETrue;
                         }
@@ -1532,6 +1541,27 @@
             break;
             }
 
+        case R_AVKON_MENUPANE_MARK_MULTIPLE:
+                {
+                TInt markedContactCount = 0;
+                
+                CPbk2NamesListControl* nlctrl = static_cast <CPbk2NamesListControl*> (iControl);
+
+                CCoeControl* ctrl = nlctrl->ComponentControl(0);
+                CEikListBox* listbox=static_cast <CEikListBox*> (ctrl);
+                
+                if ( listbox )
+                    {
+                    markedContactCount = listbox->SelectionIndexes()->Count();
+                    }
+                // dim the makr all item if all contacts are marked. 
+                if ( markedContactCount > 0 && markedContactCount == iControl->NumberOfContacts() )
+                    {
+                    aMenuPane->SetItemDimmed( EAknCmdMarkingModeMarkAll, ETrue );
+                    }
+                break;
+                }
+                
         case R_PHONEBOOK2_GROUPMEMBERS_MENU:
             {
             // Weed out commands not meant to be used with empty list
@@ -1836,9 +1866,10 @@
                             CPguRemoveFromGroupCmd::NewLC(
                                 *iViewParent.FocusedContact(),
                                 *iControl);
-                    iCommandHandler.AddAndExecuteCommandL(cmd);
-                    
+                    iCommandHandler.AddAndExecuteCommandL(cmd);                    
                     CleanupStack::Pop(cmd);  // command handler takes the ownership
+                    //Store the reference here. Reset to NULL when Command is Completed.
+                    iCommand = cmd;
                     }
                 break;
                 }
@@ -1848,11 +1879,32 @@
                 CPguAddMembersCmd* cmd =
                         CPguAddMembersCmd::NewLC(*iViewParent.FocusedContact(),
                             *iControl);
-                iCommandHandler.AddAndExecuteCommandL(cmd);
+                iCommandHandler.AddAndExecuteCommandL(cmd);                
                 CleanupStack::Pop(cmd); // command handler takes the ownership
+                //Store the reference here. Reset to NULL when Command is Completed. 
+                iCommand = cmd;
                 break;
                 }
-    
+           
+			case EAknCmdExit:
+        	case EAknSoftkeyExit:
+        	case EPbk2CmdExit:
+            case EAknCmdHideInBackground:
+                {
+                CPbk2CommandStore* cmdStore = static_cast<CPbk2CommandHandler*>(&iCommandHandler)->CommandStore();
+                if ( iCommand && cmdStore )
+                    {
+                    iCommand->Abort();
+                    cmdStore->DestroyAllCommands();
+                    
+                    if( !iWait.IsStarted() )
+                        {
+                        iWait.Start();  
+                        }  
+                    }                
+                break;
+                }    
+                
             default:
                 {
                 // Do nothing
@@ -1997,7 +2049,7 @@
     {    
     if (iContainer && iContainer->Control())
         {
-        iContainer->Control()->HideThumbnail();
+        iContainer->Control()->HideThumbnail();        
         }
     }
 
@@ -2007,13 +2059,23 @@
 //
 void CPguGroupMembersView::CGroupMembersAllGroupsReady::PostCommandExecutionL
         ( const MPbk2Command& /*aCommand*/ )
-    {    
+    { 
+    if ( iCommand )
+        {
+        iCommand = NULL;
+        }
+    
     if ( iContainer && iContainer->Control() )
         {
         iContainer->Control()->ShowThumbnail();
         }
 
     UpdateCbasL();
+    if( iWait.IsStarted() )
+        {
+        iWait.AsyncStop();  
+        }
+    
     }
 
 // --------------------------------------------------------------------------
@@ -2376,7 +2438,7 @@
 //
 TBool CPguGroupMembersView::ExitMarkingMode() const
     {
-    return EFalse; 
+    return ETrue; 
     }
 
 // --------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/GroupExtension/src/CPguRemoveFromGroupCmd.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/GroupExtension/src/CPguRemoveFromGroupCmd.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -748,4 +748,19 @@
     CleanupStack::Pop( iInputBlock );   
     }
 
+
+// --------------------------------------------------------------------------
+// CPguRemoveFromGroupCmd::Abort
+// --------------------------------------------------------------------------
+//
+void CPguRemoveFromGroupCmd::Abort()
+    {
+    if ( iProgressDialog && !iDialogDismissed )
+        {
+        // Delete the dialog
+        TRAP_IGNORE( iProgressDialog->ProcessFinishedL() );
+        iProgressDialog = NULL;
+        }
+    }
+
 //  End of File  
--- a/phonebookui/Phonebook2/MMCExtension/inc/CPmuCopyToMmcCmd.h	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/MMCExtension/inc/CPmuCopyToMmcCmd.h	Wed Sep 15 11:56:55 2010 +0300
@@ -104,7 +104,11 @@
         TBool ShowMemorySelectionDialogL();
         void ShowResultsL();
         TInt HandleError( TInt aError );
-
+        /**
+         * Show result and do cleanup when copy complete.
+         */
+        void CommandCompleted();
+        
     private:  // Data
         /// Ref: UI control
         MPbk2ContactUiControl* iUiControl;
--- a/phonebookui/Phonebook2/MMCExtension/src/CPmuCopyToDriveCmd.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/MMCExtension/src/CPmuCopyToDriveCmd.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -239,15 +239,14 @@
                 }
             else
                 {
-                iState = EPmuCopyToMmcCmdComplete;
-                IssueRequest();
+                // Stop the process dialog when complete the process of copying 
+                iDecorator->ProcessStopped();
                 }
             break;
             }
         case EPmuCopyToMmcCmdComplete:
             {
-            // Copy complete, decorator calls processdismissed
-            iDecorator->ProcessStopped();
+            CommandCompleted();
             break;
             }
         default:
@@ -327,19 +326,8 @@
 //
 void CPmuCopyToMmcCmd::ProcessDismissed( TInt /*aCancelCode*/ )
     {
-    Cancel();
-    delete iRetrieveOperation;
-    iRetrieveOperation = NULL;
-    delete iExportOperation;
-    iExportOperation = NULL;
-
-    // It is a not big deal if result note is not shown to user
-    TRAP_IGNORE( ShowResultsL() );
-    if ( iUiControl )
-        {
-        iUiControl->UpdateAfterCommandExecution();
-        } 
-    iCommandObserver->CommandFinished( *this );
+    iState = EPmuCopyToMmcCmdComplete;
+    IssueRequest();
     }
 
 // --------------------------------------------------------------------------
@@ -653,4 +641,25 @@
     return err;
     }
 
+// --------------------------------------------------------------------------
+// CPmuCopyToMmcCmd::CommandCompleted
+// --------------------------------------------------------------------------
+//    
+void CPmuCopyToMmcCmd::CommandCompleted()
+    {
+    Cancel();
+    delete iRetrieveOperation;
+    iRetrieveOperation = NULL;
+    delete iExportOperation;
+    iExportOperation = NULL;
+
+    // It is a not big deal if result note is not shown to user
+    TRAP_IGNORE( ShowResultsL() );
+    if ( iUiControl )
+        {
+        iUiControl->UpdateAfterCommandExecution();
+        } 
+    iCommandObserver->CommandFinished( *this );
+    }
+
 // End of File
--- a/phonebookui/Phonebook2/MapExtension/inc/cpmapcontacteditorextension.h	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/MapExtension/inc/cpmapcontacteditorextension.h	Wed Sep 15 11:56:55 2010 +0300
@@ -22,6 +22,7 @@
 #include <e32base.h>
 #include <MPbk2ContactEditorExtension.h>
 #include <MPbk2ContactEditorExtensionExtension.h>
+#include <MPbk2CommandObserver.h>
 #include <Pbk2FieldProperty.hrh>
 
 // FORWARD DECLARATIONS
@@ -34,7 +35,8 @@
 // CLASS DECLARATION
 class CPmapContactEditorExtension : public CBase,
 								    public MPbk2ContactEditorExtension,
-								    public MPbk2ContactEditorExtensionExtension
+								    public MPbk2ContactEditorExtensionExtension,
+								    public MPbk2CommandObserver
     {
     public:
         /**
@@ -90,6 +92,10 @@
                 TFailParams& aFailParams );
         TAny* ContactEditorExtensionExtension(
                         TUid /*aExtensionUid*/ );
+        
+    public: // From MPbk2CommandObserver
+        void CommandFinished(
+                        const MPbk2Command& aCommand );
 
     private: // Implementation
         CPmapContactEditorExtension(
@@ -109,6 +115,8 @@
         MPbk2ContactEditorControl& iEditorControl;
         /// Own: Map command controller
         MPbk2Command* iCmd;
+        /// Own: Mark if Map command is finished
+        TBool iMapCommandFinish;
 	};
 
 #endif // CPMAPCONTACTEDITOREXTENSION_H
--- a/phonebookui/Phonebook2/MapExtension/src/cpmapcontacteditorextension.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/MapExtension/src/cpmapcontacteditorextension.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -113,6 +113,7 @@
 //
 inline void CPmapContactEditorExtension::ConstructL()
     {
+    iMapCommandFinish = ETrue;
     }
 
 // --------------------------------------------------------------------------
@@ -170,31 +171,53 @@
 TBool CPmapContactEditorExtension::ProcessCommandL
         ( TInt aCommandId )
     {
+    TBool result = EFalse;
+    
     switch( aCommandId )
         {
         case EPbk2ExtensionShowOnMap:
-        	{
-        	if(iCmd)
-        	    {
-                delete iCmd;
-                iCmd = NULL;
-        	    }
-        	iCmd = CPmapCmd::NewL( iEditorControl, iContact, aCommandId );
-        	// Execute the command 
-        	iCmd->ExecuteLD();
-            return ETrue;
+            {
+            // Ignore new command if the previous command is not finished
+            if ( iMapCommandFinish )
+                {
+                if(iCmd)
+                    {
+                    delete iCmd;
+                    iCmd = NULL;
+                    }
+                iCmd = CPmapCmd::NewL( iEditorControl, iContact, aCommandId );
+                
+                // Observer if the Map command is finished
+                iCmd->AddObserver( *this );
+                iMapCommandFinish = EFalse;
+                
+                // Execute the command 
+                iCmd->ExecuteLD();
+                }
+            result = ETrue;
+            break;
             }
         case EPbk2ExtensionAssignFromMap:
-        	{
-        	if(iCmd)
+            {
+            // Ignore new command if the previous command is not finished
+            if ( iMapCommandFinish )
                 {
-                delete iCmd;
-                iCmd = NULL;
+                if(iCmd)
+                    {
+                    delete iCmd;
+                    iCmd = NULL;
+                    }
+                iCmd = CPmapCmd::NewL( iEditorControl, iContact, aCommandId );
+                
+                // Observer if the Map command is finished
+                iCmd->AddObserver( *this );
+                iMapCommandFinish = EFalse;
+                
+                // Execute the command
+                iCmd->ExecuteLD();
                 }
-        	iCmd = CPmapCmd::NewL( iEditorControl, iContact, aCommandId );
-        	// Execute the command
-        	iCmd->ExecuteLD();
-            return ETrue;
+            result = ETrue;
+            break;
             }
         default:
             {
@@ -202,7 +225,16 @@
             break;
             }
         }
-    return EFalse;
+    return result;
+    }
+
+// --------------------------------------------------------------------------
+// CPmapContactEditorExtension::CommandFinished
+// --------------------------------------------------------------------------
+//
+void CPmapContactEditorExtension::CommandFinished(const MPbk2Command& /*aCommand*/)
+    {
+    iMapCommandFinish = ETrue;
     }
 
 // --------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/NamesListExtension/src/NamesListExView.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/NamesListExtension/src/NamesListExView.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -809,6 +809,20 @@
         case R_AVKON_MENUPANE_MARK_MULTIPLE:
             {
             TInt pos;
+            TInt markedContactCount = 0;
+            
+            CPbk2ContactViewListBox* listbox = 
+                static_cast<CPbk2ContactViewListBox*>(iControl->ComponentControl(0));
+            
+            if ( listbox )
+                {
+                markedContactCount = listbox->SelectionIndexes()->Count();
+                }
+            // dim the makr all item if all contacts are marked. 
+            if ( markedContactCount > 0 && markedContactCount == iControl->NumberOfContacts() )
+                {
+                aMenuPane->SetItemDimmed( EAknCmdMarkingModeMarkAll, ETrue );
+                }
             if ( aMenuPane->MenuItemExists( EAknCmdMarkingModeEnter, pos ) &&
                     iControl->NumberOfContacts() <= 0 )
                 {
@@ -818,7 +832,11 @@
             }
         case R_PHONEBOOK2_NAMESLIST_BACKUP_MENU_PLACEHOLDER:
             {
-            if ( iControl->ContactsMarked() && iMarkingModeOn )
+            TInt pos = 0;
+            // Checks whether there are marked contacts and
+            // whether menu pane contains the menu item
+            if ( iMarkingModeOn && iControl->ContactsMarked() &&
+                    aMenuPane->MenuItemExists( EPmuCmdCascadingBackup, pos ) )
                 {
                 // This item is shown in option menu but not in popup menu
                 CEikMenuBar* menuBar = static_cast<CEikMenuBar*>( aMenuPane->Parent() );
@@ -835,8 +853,12 @@
             }
         case R_PHONEBOOK2_NAMESLIST_SEND_URL_MENU:
             {
+            TInt pos = 0;
             DimItem( aMenuPane, EPbk2CmdGoToURL );
-            if ( iControl->ContactsMarked() && iMarkingModeOn )
+            // Checks whether there are marked contacts and
+            // whether menu pane contains the menu item
+            if ( iMarkingModeOn && iControl->ContactsMarked() &&
+                    aMenuPane->MenuItemExists( EPbk2CmdSend, pos ) )
                 {
                 aMenuPane->SetItemDimmed( EPbk2CmdSend, EFalse );
                 }
@@ -1614,7 +1636,7 @@
 //
 TBool CPbk2NamesListExView::ExitMarkingMode() const
     {
-    return EFalse; 
+    return ETrue; 
     }
     
 //---------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/Phonebook2/Presentation/rss/Pbk2PresentationChineseUnSync.rss	Wed Sep 15 11:56:55 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Phonebook 2 presentation Chinese resources.
+*
+*/
+
+
+// INCLUDES
+#include "Pbk2ChineseFieldOrdering.hrh"    // Resources for default languages
+#include "Pbk2PresentationCommonUnSync.rss"   // Common resources for all languages
+
+/*============================================================================
+* NB. Pbk2Presentation resources MUST be defined in Pbk2PresentationCommon.rss
+* because only one Pbk2Presentation.rsg file used with different language 
+* specific ".rsc" files. Otherwise BC is broken.
+============================================================================*/
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/phonebookui/Phonebook2/Presentation/rss/Pbk2PresentationCommonUnSync.rss	Wed Sep 15 11:56:55 2010 +0300
@@ -0,0 +1,2159 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Phonebook 2 presentation common resources for all languages.
+*
+*                Note that in order to retain BINARY COMPATIBILITY no new 
+*                resources must be declared in-between the existing resources.
+*                To make it sure after changes, compare the generated files
+*                before and after (Pbk2Presentation*.rsg)
+*
+*/
+
+
+#include "Pbk2PresentationString.rh"
+
+#include <Pbk2StoreProperty.rh>
+#include <Pbk2ContactView.hrh>
+#include <Pbk2StoreProperty.hrh>
+#include <Pbk2StoreInfo.hrh>
+#include <phonebook2.loc>
+#include <phonebook2ece.loc>
+#include <Pbk2IconId.hrh>
+#include <Pbk2UID.h>
+#include <Pbk2FieldProperty.hrh>
+#include <Pbk2FieldProperty.rh>
+#include <Pbk2ContentIdentifiers.hrh>
+#include <Pbk2IconId.rh>
+#include "pbk2wellknownservices.rh"
+
+#include <VPbkContactView.rh>
+#include <VPbkFieldType.rh>
+#include <VPbkStoreUriDefinitions.hrh>
+#include <VPbkEng.rsg>
+
+#include <eikon.rh>
+
+// RESOURCE IDENTIFIER
+NAME    PBPR    // Phonebook 2 Presentation
+
+// --------------------------------------------------------------------------
+// Standard resource signature
+// --------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE { }
+
+// --------------------------------------------------------------------------
+// Name display order definition for last name first name ordering
+// --------------------------------------------------------------------------
+//
+RESOURCE VPBK_FIELD_TYPE_MAPPING_LIST
+        r_default_name_display_order_lastname_firstname
+    {
+    items =
+        {
+        /// Top contact indicator / Top contact internal order        
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameTopContact;
+                };
+            },
+        /// Last name
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameN;
+                subField = EVPbkVersitSubFieldFamilyName;
+                };
+            },
+        /// First name
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameN;
+                subField = EVPbkVersitSubFieldGivenName;
+                };
+            },
+        /// Company name
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameORG;
+                subField = EVPbkVersitSubFieldOrgName;
+                };
+            },
+        /// Generic label
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY {};
+            nonVersitType = EVPbkNonVersitTypeGenericLabel;
+            }
+        };
+    }
+
+// --------------------------------------------------------------------------
+// Name display order definition for first name last name ordering
+// --------------------------------------------------------------------------
+//
+RESOURCE VPBK_FIELD_TYPE_MAPPING_LIST
+        r_default_name_display_order_firstname_lastname
+    {
+    items =
+        {
+        /// Top contact indicator / Top contact internal order        
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameTopContact;
+                };
+            },
+        /// First name
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameN;
+                subField = EVPbkVersitSubFieldGivenName;
+                };
+            },
+        /// Last name
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameN;
+                subField = EVPbkVersitSubFieldFamilyName;
+                };
+            },
+        /// Company name
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameORG;
+                subField = EVPbkVersitSubFieldOrgName;
+                };
+            },
+        /// Generic label
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY {};
+            nonVersitType = EVPbkNonVersitTypeGenericLabel;
+            }
+        };
+    }
+
+// --------------------------------------------------------------------------
+// Japanese name display order definition for last name first name ordering
+// --------------------------------------------------------------------------
+//
+RESOURCE VPBK_FIELD_TYPE_MAPPING_LIST
+        r_japanese_name_display_order_lastname_firstname
+    {
+    items =
+        {
+        /// Top contact indicator / Top contact internal order        
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameTopContact;
+                };
+            },
+        /// Last name reading
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameSOUND;
+                subField = EVPbkVersitSubFieldFamilyNamePronunciation;
+                };
+            },
+        /// First name reading
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameSOUND;
+                subField = EVPbkVersitSubFieldGivenNamePronunciation;
+                };
+            },
+        /// Last name
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameN;
+                subField = EVPbkVersitSubFieldFamilyName;
+                };
+            },
+        /// First name
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameN;
+                subField = EVPbkVersitSubFieldGivenName;
+                };
+            },
+        /// company name
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameORG;
+                subField = EVPbkVersitSubFieldOrgName;
+                };
+            },
+        /// Generic label
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY {};
+            nonVersitType = EVPbkNonVersitTypeGenericLabel;
+            }
+        };
+    }
+
+// --------------------------------------------------------------------------
+// Japanese name display order definition for first name last name ordering
+// --------------------------------------------------------------------------
+//
+RESOURCE VPBK_FIELD_TYPE_MAPPING_LIST
+        r_japanese_name_display_order_firstname_lastname
+    {
+    items =
+        {
+        /// Top contact indicator / Top contact internal order        
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameTopContact;
+                };
+            },
+        /// First name reading
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameSOUND;
+                subField = EVPbkVersitSubFieldGivenNamePronunciation;
+                };
+            },
+        /// Last name reading
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameSOUND;
+                subField = EVPbkVersitSubFieldFamilyNamePronunciation;
+                };
+            },
+        /// First name
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameN;
+                subField = EVPbkVersitSubFieldGivenName;
+                };
+            },
+        /// Last name
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameN;
+                subField = EVPbkVersitSubFieldFamilyName;
+                };
+            },
+        /// Company name
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY
+                {
+                name = EVPbkVersitNameORG;
+                subField = EVPbkVersitSubFieldOrgName;
+                };
+            },
+        /// Generic label
+        VPBK_FIELD_TYPE_MAPPING
+            {
+            versitProperty = VBK_FIELD_VERSIT_PROPERTY {};
+            nonVersitType = EVPbkNonVersitTypeGenericLabel;
+            }
+        };
+    }
+
+// --------------------------------------------------------------------------
+// Default name ordering configuration
+// --------------------------------------------------------------------------
+//
+RESOURCE PBK2_PRESENTATION_STRING r_qtn_phob_name_order
+    {
+    text = qtn_phob_name_order;
+    }
+
+// --------------------------------------------------------------------------
+// Default name ordering separator usage configuration
+// --------------------------------------------------------------------------
+//
+RESOURCE PBK2_PRESENTATION_STRING r_qtn_phob_name_separator_used
+    {
+    text = qtn_phob_name_separator_used;
+    }
+
+// --------------------------------------------------------------------------
+// Default name ordering separator character configuration
+// --------------------------------------------------------------------------
+//
+RESOURCE PBK2_PRESENTATION_STRING r_qtn_phob_name_separator_char
+    {
+    text = qtn_phob_name_separator_char;
+    }
+
+// --------------------------------------------------------------------------
+// Title field selector
+// --------------------------------------------------------------------------
+//
+RESOURCE VPBK_FIELD_TYPE_SELECTOR r_title_field_selector
+    {
+    versitProperties =
+        {
+        /// Last name
+        VBK_FIELD_VERSIT_PROPERTY
+            {
+            name = EVPbkVersitNameN;
+            subField = EVPbkVersitSubFieldFamilyName;
+            },
+        /// First name
+        VBK_FIELD_VERSIT_PROPERTY
+            {
+            name = EVPbkVersitNameN;
+            subField = EVPbkVersitSubFieldGivenName;
+            },
+        /// Company name
+        VBK_FIELD_VERSIT_PROPERTY
+            {
+            name = EVPbkVersitNameORG;
+            subField = EVPbkVersitSubFieldOrgName;
+            },
+        /// Last name reading
+        VBK_FIELD_VERSIT_PROPERTY
+            {
+            name = EVPbkVersitNameSOUND;
+            subField = EVPbkVersitSubFieldFamilyNamePronunciation;
+            },
+        /// First name reading
+        VBK_FIELD_VERSIT_PROPERTY
+            {
+            name = EVPbkVersitNameSOUND;
+            subField = EVPbkVersitSubFieldGivenNamePronunciation;
+            }
+        };
+    nonVersitType =
+        {
+        EVPbkNonVersitTypeGenericLabel
+        };
+    }
+
+// --------------------------------------------------------------------------
+// Phonebook 2 field properties
+// --------------------------------------------------------------------------
+//
+RESOURCE PHONEBOOK2_FIELD_PROPERTY_ARRAY r_phonebook_field_properties
+    {
+    items =
+        {
+        /// Last name
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_LASTNAME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagTemplateField | KPbk2FieldFlagUserCanAddField |
+                    KPbk2FieldFlagCanNotBeRemoved;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdLastName;
+            defaultLabel = qtn_phob_lbl_last_name;
+            },
+        /// Last name reading
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_LASTNAMEREADING;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeReadingEditor;
+            flags = KPbk2FieldFlagTemplateField | KPbk2FieldFlagUserCanAddField |
+                    KPbk2FieldFlagCanNotBeRemoved;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdLastName;
+            defaultLabel = qtn_phob_lbl_last_reading;
+            },
+        /// First name
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_FIRSTNAME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagTemplateField | KPbk2FieldFlagUserCanAddField |
+                    KPbk2FieldFlagCanNotBeRemoved;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdFirstName;
+            defaultLabel = qtn_phob_lbl_first_name;
+            },
+        /// First name reading
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_FIRSTNAMEREADING;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeReadingEditor;
+            flags = KPbk2FieldFlagTemplateField | KPbk2FieldFlagUserCanAddField |
+                    KPbk2FieldFlagCanNotBeRemoved;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdFirstName;
+            defaultLabel = qtn_phob_lbl_first_reading;
+            },
+        /// Prefix
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_PREFIX;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 10;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdNone;
+            defaultLabel = qtn_phob_lbl_prefix;
+            },
+        /// Suffix
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_SUFFIX;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 10;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdNone;
+            defaultLabel = qtn_phob_lbl_suffix;
+            },
+        /// Nick name
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_SECONDNAME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_simp_lbl_nick;
+            },
+        /// Landline phone (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_LANDPHONEHOME;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_phone;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationHome;
+            defaultLabel = qtn_phob_lbl_number_home;
+            },
+        /// Mobile phone (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_MOBILEPHONEHOME;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_mobile;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationHome;
+            defaultLabel = qtn_phob_lbl_number_mobile_home;
+            },
+        /// Video number (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_VIDEONUMBERHOME;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_video;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationHome;
+            defaultLabel = qtn_phob_lbl_video_home;
+            },
+        /// Fax number (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_FAXNUMBERHOME;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_fax;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationHome;
+            defaultLabel = qtn_phob_lbl_fax_home;
+            },
+        /// VOIP (Tel. Internet) (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_VOIPHOME;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 100;
+            editMode = EPbk2FieldEditModeLatinOnly;
+            defaultCase = EPbk2FieldDefaultCaseLower;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_voip;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationHome;
+            defaultLabel = qtn_phob_lbl_voip_home;
+            },
+        /// Email address (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_EMAILHOME;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 150;
+            editMode = EPbk2FieldEditModeLatinOnly;
+            defaultCase = EPbk2FieldDefaultCaseLower;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_email;
+                };
+            ctrlType = EPbk2FieldCtrlEmailEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationHome;
+            defaultLabel = qtn_phob_lbl_email_home;
+            },
+        /// URL (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_URLHOME;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 1000;
+            editMode = EPbk2FieldEditModeLatinOnly;
+            defaultCase = EPbk2FieldDefaultCaseLower;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_url;
+                };
+            ctrlType = EPbk2FieldCtrlURLEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationHome;
+            defaultLabel = qtn_phob_lbl_url_home;
+            },
+        /// Address label (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRLABELHOME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 250;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_address;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagNull;
+            location = EPbk2FieldLocationHome;
+            defaultLabel = qtn_phob_lbl_address_home;
+            },
+        /// Address postoffice (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRPOHOME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 20;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeNumberEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_pobox_home;
+            location = EPbk2FieldLocationHome;
+            groupId = EPbk2FieldGroupIdHomeAddress;
+            defaultLabel = qtn_phob_lbl_pobox_home;
+            },
+        /// Address extension (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDREXTHOME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_extension_home;
+            location = EPbk2FieldLocationHome;
+            groupId = EPbk2FieldGroupIdHomeAddress;
+            defaultLabel = qtn_phob_lbl_extencion_home;
+            },
+        /// Address street (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRSTREETHOME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_street_home;
+            location = EPbk2FieldLocationHome;
+            groupId = EPbk2FieldGroupIdHomeAddress;
+            defaultLabel = qtn_phob_lbl_street_home;
+            },
+        /// Address city (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRLOCALHOME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_city_home;
+            location = EPbk2FieldLocationHome;
+            groupId = EPbk2FieldGroupIdHomeAddress;
+            defaultLabel = qtn_phob_lbl_city_home;
+            },
+        /// Address region (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRREGIONHOME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_state_home;
+            location = EPbk2FieldLocationHome;
+            groupId = EPbk2FieldGroupIdHomeAddress;
+            defaultLabel = qtn_phob_lbl_state_home;
+            },
+        /// Address postal code (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRPOSTCODEHOME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 20;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlPostalCodeEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_postal_code_home;
+            location = EPbk2FieldLocationHome;
+            groupId = EPbk2FieldGroupIdHomeAddress;
+            defaultLabel = qtn_phob_lbl_postal_code_home;
+            },
+        /// Address country (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRCOUNTRYHOME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_country_home;
+            location = EPbk2FieldLocationHome;
+            groupId = EPbk2FieldGroupIdHomeAddress;
+            defaultLabel = qtn_phob_lbl_country_home;
+            },
+        /// Job title
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_JOBTITLE;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagTemplateField |
+                    KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_job_title;
+            },
+        /// Company name
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_COMPANYNAME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagTemplateField |
+                    KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_company_name;
+            },
+        /// Landline phone (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_LANDPHONEWORK;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_phone;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationWork;
+            defaultLabel = qtn_phob_lbl_number_work;
+            },
+        /// Mobile phone (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_MOBILEPHONEWORK;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_mobile;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationWork;
+            defaultLabel = qtn_phob_lbl_number_mobile_work;
+            },
+        /// Video number (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_VIDEONUMBERWORK;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_video;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationWork;
+            defaultLabel = qtn_phob_lbl_video_work;
+            },
+        /// Fax number (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_FAXNUMBERWORK;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_fax;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationWork;
+            defaultLabel = qtn_phob_lbl_fax_work;
+            },
+        /// VOIP (Tel. Internet) (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_VOIPWORK;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 100;
+            editMode = EPbk2FieldEditModeLatinOnly;
+            defaultCase = EPbk2FieldDefaultCaseLower;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_voip;
+                };
+            ctrlType = EPbk2FieldCtrlEmailEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationWork;
+            defaultLabel = qtn_phob_lbl_voip_work;
+            },
+        /// Email address (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_EMAILWORK;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 150;
+            editMode = EPbk2FieldEditModeLatinOnly;
+            defaultCase = EPbk2FieldDefaultCaseLower;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_email;
+                };
+            ctrlType = EPbk2FieldCtrlEmailEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationWork;
+            defaultLabel = qtn_phob_lbl_email_work;
+            },
+        /// URL (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_URLWORK;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 1000;
+            editMode = EPbk2FieldEditModeLatinOnly;
+            defaultCase = EPbk2FieldDefaultCaseLower;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_url;
+                };
+            ctrlType = EPbk2FieldCtrlURLEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationWork;
+            defaultLabel = qtn_phob_lbl_url_work;
+            },
+        /// Address label (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRLABELWORK;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 250;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_address;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagNull;
+            location = EPbk2FieldLocationWork;
+            defaultLabel = qtn_phob_lbl_address_work;
+            },
+        /// Address postoffice (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRPOWORK;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 20;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeNumberEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_pobox_work;
+            location = EPbk2FieldLocationWork;
+            groupId = EPbk2FieldGroupIdCompanyAddress;
+            defaultLabel = qtn_phob_lbl_pobox_work;
+            },
+        /// Address extension (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDREXTWORK;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_extension_work;
+            location = EPbk2FieldLocationWork;
+            groupId = EPbk2FieldGroupIdCompanyAddress;
+            defaultLabel = qtn_phob_lbl_extencion_work;
+            },
+        /// Address street (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRSTREETWORK;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_street_work;
+            location = EPbk2FieldLocationWork;
+            groupId = EPbk2FieldGroupIdCompanyAddress;
+            defaultLabel = qtn_phob_lbl_street_work;
+            },
+        /// Address city (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRLOCALWORK;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_city_work;
+            location = EPbk2FieldLocationWork;
+            groupId = EPbk2FieldGroupIdCompanyAddress;
+            defaultLabel = qtn_phob_lbl_city_work;
+            },
+        /// Address region (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRREGIONWORK;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_state_work;
+            location = EPbk2FieldLocationWork;
+            groupId = EPbk2FieldGroupIdCompanyAddress;
+            defaultLabel = qtn_phob_lbl_state_work;
+            },
+        /// Address postal code (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRPOSTCODEWORK;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 20;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlPostalCodeEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_postal_code_work;
+            location = EPbk2FieldLocationWork;
+            groupId = EPbk2FieldGroupIdCompanyAddress;
+            defaultLabel = qtn_phob_lbl_postal_code_work;
+            },
+        /// Address country (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRCOUNTRYWORK;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_country_work;
+            location = EPbk2FieldLocationWork;
+            groupId = EPbk2FieldGroupIdCompanyAddress;
+            defaultLabel = qtn_phob_lbl_country_work;
+            },
+        /// Landline phone (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_LANDPHONEGEN;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_phone;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagTemplateField |
+                    KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_number_standard;
+            },
+        /// Mobile phone (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_MOBILEPHONEGEN;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_mobile;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagTemplateField |
+                    KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_number_mobile;
+            },
+        /// Video number (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_VIDEONUMBERGEN;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_video;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagTemplateField |
+                    KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_video;
+            },
+        /// Fax number (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_FAXNUMBERGEN;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_fax;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_fax;
+            },
+        /// VOIP (Tel. Internet) (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_VOIPGEN;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 100;
+            editMode = EPbk2FieldEditModeLatinOnly;
+            defaultCase = EPbk2FieldDefaultCaseLower;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_voip;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagTemplateField |
+                    KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_voip;
+            },
+        /// PTT (POC)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_POC;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 100;
+            editMode = EPbk2FieldEditModeLatinOnly;
+            defaultCase = EPbk2FieldDefaultCaseLower;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_poc;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagTemplateField |
+                    KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_poc;
+            },
+        /// SWIS (Share view)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_SWIS;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 100;
+            editMode = EPbk2FieldEditModeLatinOnly;
+            defaultCase = EPbk2FieldDefaultCaseLower;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_swis;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_swis;
+            },
+        /// SIP
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_SIP;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 100;
+            editMode = EPbk2FieldEditModeLatinOnly;
+            defaultCase = EPbk2FieldDefaultCaseLower;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_sip;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_sip;
+            },
+        /// Email address (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_EMAILGEN;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 150;
+            editMode = EPbk2FieldEditModeLatinOnly;
+            defaultCase = EPbk2FieldDefaultCaseLower;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_email;
+                };
+            ctrlType = EPbk2FieldCtrlEmailEditor;
+            flags = KPbk2FieldFlagTemplateField |
+                    KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_email;
+            },
+        /// URL (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_URLGEN;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 1000;
+            editMode = EPbk2FieldEditModeLatinOnly;
+            defaultCase = EPbk2FieldDefaultCaseLower;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_url;
+                };
+            ctrlType = EPbk2FieldCtrlURLEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_url;
+            },
+        /// Address label (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRLABELGEN;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 250;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_address;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagNull;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_address;
+            },
+        /// Address postoffice (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRPOGEN;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 20;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeNumberEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_pobox;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdPostalAddress;
+            defaultLabel = qtn_phob_lbl_address;
+            },
+        /// Address extension (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDREXTGEN;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_extension;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdPostalAddress;
+            defaultLabel = qtn_phob_lbl_extencion;
+            },
+        /// Address street (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRSTREETGEN;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_street;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdPostalAddress;
+            defaultLabel = qtn_phob_lbl_street;
+            },
+        /// Address city (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRLOCALGEN;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_city;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdPostalAddress;
+            defaultLabel = qtn_phob_lbl_city;
+            },
+        /// Address region (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRREGIONGEN;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_state;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdPostalAddress;
+            defaultLabel = qtn_phob_lbl_state;
+            },
+        /// Address postal code (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRPOSTCODEGEN;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 20;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlPostalCodeEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_postal_code;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdPostalAddress;
+            defaultLabel = qtn_phob_lbl_postal_code;
+            },
+        /// Address country (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ADDRCOUNTRYGEN;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            addItemText = qtn_phob_lbl2_country;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdPostalAddress;
+            defaultLabel = qtn_phob_lbl_country;
+            },
+        /// Pager number
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_PAGERNUMBER;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_pager;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagTemplateField |
+                    KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_pager;
+            },
+        /// DTMF string
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_DTMFSTRING;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 60;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_phonebook2_unsync;
+                };
+            ctrlType = EPbk2FieldCtrlTypeDTMFEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_dtmf;
+            },
+
+        /// Wv(IM) address field - will be inserted by PEC & IM
+
+        /// Date
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_DATE;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeDate;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_date;
+                };
+            ctrlType = EPbk2FieldCtrlTypeDateEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_date;
+            },
+        /// Note
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_NOTE;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 1000;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_note;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_note;
+            },
+        /// Thumbnail photo
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_THUMBNAILPIC;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 0;
+            editMode = EPbk2FieldEditModeSelector;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeNone;
+            flags = KPbk2FieldFlagDisableEdit |
+                    KPbk2FieldFlagHideFromDetailsView;
+            location = EPbk2FieldLocationNone;
+            },
+        /// Ringing tone
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_RINGTONE;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 256;   
+            editMode = EPbk2FieldEditModeSelector;  // If editing happends with commands
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_phonebook2_unsync;
+                };
+            ctrlType = EPbk2FieldCtrlTypeRingtoneEditor;  
+            flags = KPbk2FieldFlagTemplateField | KPbk2FieldFlagCanNotBeRemoved | KPbk2FieldFlagUserCanAddField; 
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_tone;
+            },
+        /// Caller object image
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_CALLEROBJIMG;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 256;
+            editMode = EPbk2FieldEditModeSelector;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeImageEditor;  
+            flags = KPbk2FieldFlagTemplateField | KPbk2FieldFlagCanNotBeRemoved | KPbk2FieldFlagUserCanAddField; 
+            location = EPbk2FieldLocationNone;
+            defaultLabel = qtn_phob_lbl_image;
+            },
+        /// Middle name
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_MIDDLENAME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdLastName;
+            defaultLabel = qtn_phob_lbl_middle_name;
+            },
+        /// Department
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_DEPARTMENT;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdNone;
+            defaultLabel = qtn_phob_lbl_dept_name;
+            },
+        /// Assistant name
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ASSTNAME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdNone;
+            defaultLabel = qtn_phob_lbl_assistant_name;
+            },
+        /// Spouse
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_SPOUSE;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdNone;
+            defaultLabel = qtn_phob_lbl_spouse;
+            },
+        /// Children
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_CHILDREN;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseText;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdNone;
+            defaultLabel = qtn_phob_lbl_children;
+            },
+        /// Assistant phone
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ASSTPHONE;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_assistant;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdNone;
+            defaultLabel = qtn_phob_lbl_number_assistant;
+            },
+        /// Car phone
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_CARPHONE;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 48;
+            editMode = EPbk2FieldEditModeNumeric;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_car;
+                };
+            ctrlType = EPbk2FieldCtrlTypePhoneNumberEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdNone;
+            defaultLabel = qtn_phob_lbl_car_tel;
+            },
+        /// Anniversary
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_ANNIVERSARY;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 0;
+            editMode = EPbk2FieldEditModeDate;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_date;
+                };
+            ctrlType = EPbk2FieldCtrlTypeDateEditor;
+            flags = KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdNone;
+            defaultLabel = qtn_phob_lbl_anniversary;
+            },
+        /// Synchronization
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_SYNCCLASS;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 10;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeChoiceItems;
+            flags = KPbk2FieldFlagTemplateField |
+                    KPbk2FieldFlagCanNotBeRemoved |
+                    KPbk2FieldFlagHideFromDetailsView;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdNone;
+            defaultLabel = qtn_phob_lbl_synchronization;
+            },
+        /// Top contact field
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_TOPCONTACT;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 0;
+            editMode = EPbk2FieldEditModeSelector;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeNone;
+            flags = KPbk2FieldFlagDisableEdit |
+                    KPbk2FieldFlagCanNotBeRemoved  |
+                    KPbk2FieldFlagHideFromDetailsView;
+            location = EPbk2FieldLocationNone;
+            },
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_IMPP;
+            multiplicity = EPbk2FieldMultiplicityMany;
+            maxLength = 100;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseLower;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeIMPPEditor;
+            flags = KPbk2FieldFlagTemplateField | KPbk2FieldFlagUserCanAddField;
+            location = EPbk2FieldLocationNone;
+            },
+        /// Geographic coordinates (home)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_GEOHOME;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagDisableEdit
+                | KPbk2FieldFlagHideFromDetailsView;
+            location = EPbk2FieldLocationHome;
+            groupId = EPbk2FieldGroupIdNone;
+            },
+        /// Geographic coordinates (work)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_GEOWORK;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagDisableEdit
+                | KPbk2FieldFlagHideFromDetailsView;
+            location = EPbk2FieldLocationWork;
+            groupId = EPbk2FieldGroupIdNone;
+            },
+        /// Geographic coordinates (general)
+        PHONEBOOK2_FIELD_PROPERTY
+            {
+            fieldTypeLink = R_VPBK_FIELD_TYPE_GEOGEN;
+            multiplicity = EPbk2FieldMultiplicityOne;
+            maxLength = 50;
+            editMode = EPbk2FieldEditModeAlpha;
+            defaultCase = EPbk2FieldDefaultCaseNone;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            ctrlType = EPbk2FieldCtrlTypeTextEditor;
+            flags = KPbk2FieldFlagDisableEdit
+                | KPbk2FieldFlagHideFromDetailsView;
+            location = EPbk2FieldLocationNone;
+            groupId = EPbk2FieldGroupIdNone;
+            }
+        };
+    }
+
+// --------------------------------------------------------------------------
+// Phonebook 2 field group array
+// --------------------------------------------------------------------------
+//
+RESOURCE PHONEBOOK2_FIELD_GROUP_ARRAY r_phonebook2_field_group_array
+    {
+    items =
+        {
+        PHONEBOOK2_FIELD_GROUP
+            {
+            id = EPbk2FieldGroupIdPostalAddress;
+            label = qtn_phob_header_address;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_address;
+                };
+            addItemOrdering = EPbk2AddItemOrderPostalAddress;
+            },
+        PHONEBOOK2_FIELD_GROUP
+            {
+            id = EPbk2FieldGroupIdHomeAddress;
+            label = qtn_phob_header_address_home;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_address;
+                };
+            addItemOrdering = EPbk2AddItemOrderHomeAddress;
+            },
+        PHONEBOOK2_FIELD_GROUP
+            {
+            id = EPbk2FieldGroupIdCompanyAddress;
+            label = qtn_phob_header_address_work;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_address;
+                };
+            addItemOrdering = EPbk2AddItemOrderCompanyAddress;
+            },
+        PHONEBOOK2_FIELD_GROUP
+            {
+            id = EPbk2FieldGroupIdFirstName;
+            label = qtn_phob_lbl_first_name;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            addItemOrdering = EPbk2AddItemOrderFirstName;
+            },
+        PHONEBOOK2_FIELD_GROUP
+            {
+            id = EPbk2FieldGroupIdLastName;
+            label = qtn_phob_lbl_last_name;
+            iconId = PHONEBOOK2_ICON_ID
+                {
+                ownerUid = KPbk2UID3;
+                id = EPbk2qgn_prop_nrtyp_empty;
+                };
+            addItemOrdering = EPbk2AddItemOrderLastName;
+            }
+        };
+    }
+
+// --------------------------------------------------------------------------
+// Contacts model store properties
+// --------------------------------------------------------------------------
+//
+RESOURCE PHONEBOOK2_STORE_PROPERTY_ARRAY r_phonebook2_store_properties
+    {
+    items =
+        {
+        PHONEBOOK2_STORE_PROPERTY
+            {
+            version = 0;
+            storeUri = KVPBK_DEFAULT_CNTDB_URI;
+            storeName = qtn_phob_set_memory_phone;
+            flags = KPbk2ShownInMemorySelectionList |
+                    KPbk2DefaultSavingStorageItem;
+            views =
+                {
+                PHONEBOOK2_STORE_VIEW
+                    {
+                    version = 0;
+                    viewType = EPbk2MainNamesList;
+                    viewLocation = EPbk2MergedMainList;
+                    viewDefinition = VPBK_CONTACT_VIEW
+                        {
+                        uri = KVPBK_DEFAULT_CNTDB_URI;
+                        flags = EVPbkContactViewFlagsNone;
+                        subViews = {};
+                        };
+                    iconId = PHONEBOOK2_ICON_ID { };
+                    },
+                PHONEBOOK2_STORE_VIEW
+                    {
+                    version = 0;
+                    viewType = EPbk2MainTopContactsList;  
+                    viewLocation = EPbk2MergedTopContactsList; 
+                    viewDefinition = VPBK_CONTACT_VIEW
+                        {
+                        uri = KVPBK_DEFAULT_CNTDB_URI;
+                        flags = EVPbkContactViewFlagsNone;
+                        subViews = {};
+                        };
+                    iconId = PHONEBOOK2_ICON_ID
+                        {
+                        //Icon provided by extension 
+                        };
+                    },
+                PHONEBOOK2_STORE_VIEW
+                    {
+                    version = 0;
+                    viewType = EPbk2MainGroupsList;
+                    viewLocation = EPbk2MergedMainList;
+                    viewDefinition = VPBK_CONTACT_VIEW
+                        {
+                        uri = KVPBK_DEFAULT_CNTDB_URI;
+                        type = EVPbkGroupsView;
+                        subViews = {};
+                        };
+                    iconId = PHONEBOOK2_ICON_ID
+                        {
+                        ownerUid = KPbk2UID3;
+                        id = EPbk2qgn_prop_group_small;
+                        };
+                    }
+                };
+            memoryInfoItemTypes = KPbk2StoreInfoNumberOfContacts |
+                KPbk2StoreInfoNumberOfGroups | KPbk2StoreInfoReservedMemory |
+                KPbk2StoreInfoFreeMemory;
+            localizedResourceStrings =
+                {
+                PHONEBOOK2_LOCALIZED_TEXT
+                    {
+                    context = EPbk2MemInfoPhone;
+                    text = qtn_phob_pb_info_memory_phone;
+                    },
+                PHONEBOOK2_LOCALIZED_TEXT
+                    {
+                    context = EPbk2CopyQueryItem;
+                    text = qtn_pbcop_copy_query_list_item_phone;
+                    },
+                PHONEBOOK2_LOCALIZED_TEXT
+                    {
+                    context = EPbk2MemInfoContacts;
+                    text = qtn_phob_pb_info_memory_phone_colon;
+                    }
+                };
+            }
+        };
+    }
+
+// --------------------------------------------------------------------------
+// Main contact view structure
+// --------------------------------------------------------------------------
+//
+RESOURCE VPBK_CONTACT_VIEW r_phonebook2_main_contact_view_structure
+    {
+    id = EPbk2RootViewId;
+    type = EVPbkCompositeView;
+    sortPolicy = EVPbkOrderedContactView;
+    subViews =
+        {
+        /// Placeholder for EPbk2OrderedPreList
+        VPBK_CONTACT_VIEW
+            {
+            id = EPbk2OrderedPreListPlaceHolder;
+            type = EVPbkCompositeView;
+            sortPolicy = EVPbkOrderedContactView;
+            subViews = {};
+            },
+
+        /// Placeholder for EPbk2MergedTopContactsList
+        VPBK_CONTACT_VIEW
+            {
+            id = EPbk2MergedTopContactsListPlaceHolder;
+            type = EVPbkCompositeView;
+            sortPolicy = EVPbkOrderedContactView;  //To retain user defined view
+            subViews = {};
+            },
+
+            /// Placeholder for EPbk2MergedMainList
+        VPBK_CONTACT_VIEW
+            {
+            id = EPbk2MergedMainListPlaceHolder;
+            type = EVPbkCompositeView;
+            sortPolicy = EVPbkSortedContactView;
+            subViews = {};
+            },
+            
+        /// Placeholder for EPbk2OrderedPostList
+        VPBK_CONTACT_VIEW
+            {
+            id = EPbk2OrderedPostListPlaceHolder;
+            type = EVPbkCompositeView;
+            sortPolicy = EVPbkOrderedContactView;
+            subViews = {};
+            }
+        };
+    }
+
+// --------------------------------------------------------------------------
+// Unnamed string
+// --------------------------------------------------------------------------
+//
+RESOURCE PBK2_PRESENTATION_STRING r_qtn_phob_unnamed
+    {
+    text = qtn_phob_unnamed;
+    }    
+
+// --------------------------------------------------------------------------
+// A boolean to copy SIM name to pbk first or last name
+// --------------------------------------------------------------------------
+//
+RESOURCE TBUF r_qtn_phob_sim_name_copy_to_first_name     
+    { 
+    buf = qtn_phob_sim_name_copy_to_first_name; 
+    }    
+
+// Additional resource files
+#include "Pbk2ImageManager.rss"
+#include "Pbk2ContactMerge.rss"
+#include "Pbk2FieldOrdering.rss"
+
+//In order to retain BINARY COMPATIBILITY the below needs to be declared 
+//AFTER the above.
+
+// --------------------------------------------------------------------------
+// Well known services definition. Service names must not be localized.
+// --------------------------------------------------------------------------
+//
+RESOURCE PHONEBOOK2_WELL_KNOWN_SERVICES r_phonebook2_well_known_services
+    {
+    services = 
+        {
+        PHONEBOOK2_WELL_KNOWN_SERVICE
+            {
+            serviceName = "Gizmo";
+            localizedName = qtn_xsp_gizmo;
+            },
+        PHONEBOOK2_WELL_KNOWN_SERVICE
+            {
+            serviceName = "Facebook";
+            localizedName = qtn_xsp_facebook;
+            },
+        PHONEBOOK2_WELL_KNOWN_SERVICE
+            {
+            serviceName = "MSN";
+            localizedName = qtn_xsp_msn;
+            },
+        PHONEBOOK2_WELL_KNOWN_SERVICE
+            {
+            serviceName = "Yahoo";
+            localizedName = qtn_xsp_yahoo;
+            },
+        PHONEBOOK2_WELL_KNOWN_SERVICE
+            {
+            serviceName = "Ovi";
+            localizedName = qtn_xsp_ovi;
+            },
+        PHONEBOOK2_WELL_KNOWN_SERVICE
+            {
+            serviceName = "Google";
+            localizedName = qtn_xsp_google;
+            },
+        PHONEBOOK2_WELL_KNOWN_SERVICE
+            {
+            serviceName = "Skype";
+            localizedName = qtn_xsp_skype;
+            },
+        PHONEBOOK2_WELL_KNOWN_SERVICE
+            {
+            serviceName = "AIM";
+            localizedName = qtn_xsp_aim;
+            },
+        PHONEBOOK2_WELL_KNOWN_SERVICE
+            {
+            serviceName = "MySpace";
+            localizedName = qtn_xsp_myspace;
+            },
+        PHONEBOOK2_WELL_KNOWN_SERVICE
+            {
+            serviceName = "ICQ";
+            localizedName = qtn_xsp_icq;
+            }
+        };
+    }
+
+// End of File
--- a/phonebookui/Phonebook2/Presentation/src/Pbk2PresentationUtils.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/Presentation/src/Pbk2PresentationUtils.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -36,6 +36,8 @@
 _LIT( KPbk2PresentationResFile, "Pbk2Presentation.rsc" );
 // Chinese presentation resource file 
 _LIT( KPbk2PresentationResFileChinese, "Pbk2PresentationChinese.rsc" );
+// UnSync Chinese presentation resource file 
+_LIT( KPbk2PresentationResFileChineseUnSync, "Pbk2PresentationChineseUnSync.rsc" );
 
 // ================= LOCAL FUNCTIONS =======================
 #ifdef _DEBUG
@@ -222,7 +224,15 @@
     {
     if (FeatureManager::FeatureSupported(KFeatureIdChinese))
         {
-        return KPbk2PresentationResFileChinese;
+       if ( FeatureManager::FeatureSupported(KFeatureIdFfTdUnSyncabPbfieldsInd) )
+            {
+            // The resource which can't be synchronized with a server.
+            return KPbk2PresentationResFileChineseUnSync;
+            }
+        else
+            {
+            return KPbk2PresentationResFileChinese;
+            }
         }
     return KPbk2PresentationResFile;
     }    
--- a/phonebookui/Phonebook2/UIControls/inc/CPbk2ContactEditorDlgImpl.h	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/inc/CPbk2ContactEditorDlgImpl.h	Wed Sep 15 11:56:55 2010 +0300
@@ -354,7 +354,7 @@
         void ClearControls();
         TBool ContactHasAddress(TPbk2FieldGroupId aAddressGroup);
         void AddGroupFieldsL(TPbk2FieldGroupId aGroupId);
-        TBool AreAllFieldsEmpty();
+        TBool AreAllFieldsEmptyL();
         TBool IsUIDataChanged();
         TBool IsAddressValidated(TPbk2FieldGroupId aGroupId);
         void DeleteActiveAddressGeoCoords();
@@ -465,9 +465,6 @@
         HBufC* iTitleText;
         /// Own: Converts text between Unicode and SMS 7-bit 
         CCnvCharacterSetConverter* iConverter;
-        /// Ref: A pointer to stack variable in CloseDialog() for knowing
-        /// if the destructor has already been called
-        TBool* iDestroyedPtr;
         /// Ref: Holds the TopMost NaviDecorator before pushing 
         /// the empty one on to the top.
         /// Doesnt Own.
@@ -476,6 +473,16 @@
         TInt iCurrentstatuspane;
         /// Own: For asynchronously delete editordlg.
         CIdle* iDelayDelete;
+        // Own: Exit app ui after deleting the dialog
+        TBool iExitApp;
+        // Own: Whether the partial input screen is Opened
+        TBool iIsInputPaneOpen;
+        /// Ref: A pointer to stack variable in CloseDialog() for knowing
+        /// if the destructor has already been called
+        TBool* iDestroyedPtrForCloseDlg;
+        /// Ref: A pointer to stack variable in AddItemToContactL() for knowing
+        /// if the destructor has already been called
+        TBool* iDestroyedPtrForAddItem;
     };
 
 #endif // CPBK2CONTACTEDITORDLGIMPL_H
--- a/phonebookui/Phonebook2/UIControls/inc/CPbk2ContactViewListBox.h	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/inc/CPbk2ContactViewListBox.h	Wed Sep 15 11:56:55 2010 +0300
@@ -186,6 +186,16 @@
             iMarkingModeOn = aActived;
             }
 
+        /**
+         * Reset the value of iShowPopupChar, i.e. set its value to EFalse.
+         * As for iShowPopupChar, ETrue indicates showing the scrollbar popup char;
+         * EFalse indicates the opposite. 
+         */
+        inline void ResetShowPopupChar()
+            {
+            iShowPopupChar = EFalse;
+            }
+
     public: // From MPbk2ClipListBoxText
         TBool ClipFromBeginning(
                 TDes& aBuffer,
--- a/phonebookui/Phonebook2/UIControls/rss/Pbk2IconResources.rss	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/rss/Pbk2IconResources.rss	Wed Sep 15 11:56:55 2010 +0300
@@ -208,6 +208,11 @@
             {
             ownerUid = KPbk2UID3;
             id = EPbk2qgn_prop_blid_waypoint;
+            },
+        PHONEBOOK2_ICON_ID
+            {
+            ownerUid = KPbk2UID3;
+            id = EPbk2qgn_prop_phonebook2_unsync;
             }
         };
     }
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDTMFField.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDTMFField.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -124,6 +124,10 @@
     iControl->CreateTextViewL();
     iCaptionedCtrl = iUiBuilder.LineControl(ControlId());
     iCaptionedCtrl->SetTakesEnterKey(ETrue);
+    
+    // Enable partial screen input
+    TInt flags = iControl->AknEditorFlags();
+    iControl->SetAknEditorFlags(flags | EAknEditorFlagEnablePartialScreen);
     }
 
 // --------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDateField.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDateField.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -98,6 +98,8 @@
         }
     iControl->ConstructL( minimumDate, maximumDate, time, EFalse );
 
+    // Enable partial screen input
+    iControl->SetFeature(CEikMfne::EPartialScreenInput, ETrue);
     iUiBuilder.LoadBitmapToFieldL
         ( iContactField.FieldProperty(), iIconInfoContainer, ControlId() );
 
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDlgImpl.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorDlgImpl.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -70,6 +70,7 @@
 #include <Pbk2UID.h>
 #include <pbk2mapcommands.hrh>
 #include <MPbk2StartupMonitor.h>
+#include <featmgr.h>
 
 // Virtual Phonebook
 #include <CVPbkContactManager.h>
@@ -96,6 +97,7 @@
 #include <aknnavide.h>
 #include <akninputblock.h>
 #include <charconv.h>
+#include <aknpriv.hrh>
 
 /// Unnamed namespace for local definitions
 namespace {
@@ -175,7 +177,9 @@
         iEndKeyWasPressed( EFalse ),
         iAddressViewStandalone( EFalse ),
         iAppServices( aAppServices ),
-        iTitleText( aTitleText )
+        iTitleText( aTitleText ),
+        iExitApp( EFalse ),
+        iIsInputPaneOpen( EFalse )
     {
     // Exit is approved by default
     iExitRecord.Set( EExitApproved );
@@ -201,9 +205,15 @@
         *iSelfPtr = NULL;
         }
     // Make the variable in CloseDialog() to ETrue.
-    if ( iDestroyedPtr )
+    if ( iDestroyedPtrForCloseDlg )
         {
-        *iDestroyedPtr = ETrue;
+        *iDestroyedPtrForCloseDlg = ETrue;
+        }
+    
+    // Make the variable in AddItemToContactL() to ETrue.
+    if ( iDestroyedPtrForAddItem )
+        {
+        *iDestroyedPtrForAddItem = ETrue;
         }
     
     if( iAppServices )
@@ -228,7 +238,7 @@
     if (iNaviContainer)
         {
         iNaviContainer->Pop();
-        TRAP_IGNORE(RestorePrevNaviDecoratorL());        
+        TRAP_IGNORE(RestorePrevNaviDecoratorL());
         }
 
     delete iStoreContact;
@@ -244,6 +254,13 @@
 
     delete iConverter;
     delete iDelayDelete;
+    
+    // The if-expression is used here to Exit Phonebook2 for the case 
+    // that Exit phonebook2 with the EditorDlg opened.
+    if ( iExitApp )
+        {
+        TRAP_IGNORE( ((CAknViewAppUi*)CEikonEnv::Static()->EikAppUi())->ProcessCommandL( EAknCmdExit ) );
+        }
     }
 
 // --------------------------------------------------------------------------
@@ -495,19 +512,64 @@
 //
 void CPbk2ContactEditorDlgImpl::HandleResourceChange( TInt aType )
     {
-    // Handle change in layout orientation
-    if ( aType == KEikDynamicLayoutVariantSwitch )
+    switch ( aType )
         {
-        // Set status pane layout to the Phonebook 2 one
-        CEikStatusPane* statusPane = iAvkonAppUi->StatusPane();
-        if ( statusPane )
+        case KEikDynamicLayoutVariantSwitch: // Handle change in layout orientation
             {
-            iCurrentstatuspane = statusPane->CurrentLayoutResId();
-            if( iCurrentstatuspane != R_AVKON_STATUS_PANE_LAYOUT_USUAL )
+            // Set status pane layout to the Phonebook 2 one
+            CEikStatusPane* statusPane = iAvkonAppUi->StatusPane();
+            if ( statusPane )
                 {
-                TRAP_IGNORE( statusPane->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL) );
+                iCurrentstatuspane = statusPane->CurrentLayoutResId();
+                if( iCurrentstatuspane != R_AVKON_STATUS_PANE_LAYOUT_USUAL )
+                    {
+                    TRAP_IGNORE( 
+                        statusPane->SwitchLayoutL(
+                            R_AVKON_STATUS_PANE_LAYOUT_USUAL )
+                        );
+                    }
                 }
             }
+            break;
+        case KAknSplitInputEnabled:     // Handle split input keyboard
+            {
+            // Sometimes this function will be called continuously
+            // with the same parameter.
+            // Add a flag iIsInputPaneOpen to ensure the dialog
+            // only draw one time.
+            if( !iIsInputPaneOpen )
+                {
+                Layout();
+                DrawNow();
+                iIsInputPaneOpen = ETrue;
+                }
+            }
+            break;
+        case KAknSplitInputDisabled:
+            {
+            // Sometimes this function will be called continuously
+            // with the same parameter.
+            // Add a flag iIsInputPaneOpen to ensure the dialog
+            // only draw one time.
+            if( iIsInputPaneOpen )
+                {
+                // Set status pane layout to the Phonebook 2 one
+                Layout();
+                DrawNow();
+                CEikStatusPane* statusPane = iAvkonAppUi->StatusPane();
+                if ( statusPane )
+                    {
+                    TRAP_IGNORE(
+                            statusPane->SwitchLayoutL(
+                                    R_AVKON_STATUS_PANE_LAYOUT_USUAL )
+                        );
+                    }
+                iIsInputPaneOpen = EFalse;
+                }
+            }
+            break;
+        default:
+            break;
         }
     
     CAknForm::HandleResourceChange( aType );
@@ -522,6 +584,9 @@
         const TDesC& aFieldTypeXspName, 
         TBool aSetFocus )
     {
+    // For knowing whether the destructor has been called
+    TBool destroyed = EFalse;
+    iDestroyedPtrForAddItem = &destroyed;
     // Store the original parameter value, since it is
     // changed by AddFieldsL
     TInt origParam = aFieldTypeResourceId;
@@ -532,70 +597,77 @@
     CleanupStack::PushL(addItemManager);
     CPbk2AddItemManager::TReturnValue ret = addItemManager->AddFieldsL(
             aFieldTypeResourceId, xSpName);
-
-    if (ret.iControlId == KErrAlreadyExists)
+    
+    // In case that pop list for adding item is closed by FSW, this object 
+    // will be destructed by CPbk2ContactEditorOperator::ForceExit().
+    // If this object is destructed, don't execute the following anymore.
+    if ( !destroyed )
         {
-        // cannot add more than one of this field type
-        // find and focus that
-        TInt fieldArrayCount( iUiFieldArray->Count() );
-        for (TInt i(0); i < fieldArrayCount && ret.iControlId
-                == KErrAlreadyExists; ++i)
+        if (ret.iControlId == KErrAlreadyExists)
             {
-            if (!iUiFieldArray->At(i).ContactEditorField())
+            // cannot add more than one of this field type
+            // find and focus that
+            TInt fieldArrayCount( iUiFieldArray->Count() );
+            for (TInt i(0); i < fieldArrayCount && ret.iControlId
+                    == KErrAlreadyExists; ++i)
                 {
-                continue;
-                }
-            const MVPbkFieldType* fieldType =
-                iUiFieldArray->At(i).ContactEditorField()->ContactField().
-                    BestMatchingFieldType();
-            if(fieldType && fieldType->FieldTypeResId() == aFieldTypeResourceId)
-                {
-                ret.iControlId = iUiFieldArray->At(i).ControlId();
+                if (!iUiFieldArray->At(i).ContactEditorField())
+                    {
+                    continue;
+                    }
+                const MVPbkFieldType* fieldType =
+                    iUiFieldArray->At(i).ContactEditorField()->ContactField().
+                        BestMatchingFieldType();
+                if(fieldType && fieldType->FieldTypeResId() == aFieldTypeResourceId)
+                    {
+                    ret.iControlId = iUiFieldArray->At(i).ControlId();
+                    }
                 }
             }
-        }
-
-    if (ret.iControlId > 0)
-        {
-        if (aSetFocus)
+    
+        if (ret.iControlId > 0)
             {
-            TryChangeFocusL(ret.iControlId);
-            MPbk2ContactEditorField* editorField = iUiFieldArray->Find( ret.iControlId )->ContactEditorField();
-            MVPbkStoreContactField& storeContactField = editorField->ContactField();
-            iParams.iFocusedContactField = &storeContactField;
-            // Call this after adding or deleting lines
-            UpdatePageL( ETrue );
-            // Must be DrawNow and not DrawDeferred otherwise field label
-            // and content of the following field will be incorrect
-            DrawNow();
+            if (aSetFocus)
+                {
+                TryChangeFocusL(ret.iControlId);
+                MPbk2ContactEditorField* editorField = iUiFieldArray->Find( ret.iControlId )->ContactEditorField();
+                MVPbkStoreContactField& storeContactField = editorField->ContactField();
+                iParams.iFocusedContactField = &storeContactField;
+                // Call this after adding or deleting lines
+                UpdatePageL( ETrue );
+                // Must be DrawNow and not DrawDeferred otherwise field label
+                // and content of the following field will be incorrect
+                DrawNow();
+                }
+            }
+        else if (ret.iControlId == KErrNotSupported && origParam == KErrNotFound)
+            {
+            iUiFieldArray->SaveFieldsL();
+            iRelocator.RelocateContactL(aFieldTypeResourceId, xSpName,
+                Pbk2ContactRelocator::EPbk2DisplayStoreDoesNotSupportQuery);
             }
-        }
-    else if (ret.iControlId == KErrNotSupported && origParam == KErrNotFound)
-        {
-        iUiFieldArray->SaveFieldsL();
-        iRelocator.RelocateContactL(aFieldTypeResourceId, xSpName,
-            Pbk2ContactRelocator::EPbk2DisplayStoreDoesNotSupportQuery);
-        }
-    else if ( iParams.iActiveView == TPbk2ContactEditorParams::EEditorView )
-        {
-        switch( ret.iGruopId )
+        else if ( iParams.iActiveView == TPbk2ContactEditorParams::EEditorView )
             {
-            case EPbk2FieldGroupIdPostalAddress:
-                if(iUiFieldArray->Count())
-                    {
+            switch( ret.iGruopId )
+                {
+                case EPbk2FieldGroupIdPostalAddress:
+                    if(iUiFieldArray->Count())
+                        {
+                        iUiFieldArray->AddNewFieldL( ret.iGruopId );
+                        ExecuteAddressDlgL( TPbk2ContactEditorParams::EEditorAddressView );
+                        }
+                    break;
+                case EPbk2FieldGroupIdHomeAddress:
                     iUiFieldArray->AddNewFieldL( ret.iGruopId );
-                    ExecuteAddressDlgL( TPbk2ContactEditorParams::EEditorAddressView );
-                    }
-                break;
-            case EPbk2FieldGroupIdHomeAddress:
-                iUiFieldArray->AddNewFieldL( ret.iGruopId );
-                ExecuteAddressDlgL( TPbk2ContactEditorParams::EEditorAddressHomeView );
-                break;
-            case EPbk2FieldGroupIdCompanyAddress:
-                iUiFieldArray->AddNewFieldL( ret.iGruopId );
-                ExecuteAddressDlgL( TPbk2ContactEditorParams::EEditorAddressOfficeView );
-                break;
+                    ExecuteAddressDlgL( TPbk2ContactEditorParams::EEditorAddressHomeView );
+                    break;
+                case EPbk2FieldGroupIdCompanyAddress:
+                    iUiFieldArray->AddNewFieldL( ret.iGruopId );
+                    ExecuteAddressDlgL( TPbk2ContactEditorParams::EEditorAddressOfficeView );
+                    break;
+                }
             }
+        iDestroyedPtrForAddItem = NULL;
         }
     CleanupStack::PopAndDestroy(addItemManager);
     }
@@ -687,6 +759,14 @@
          return EKeyWasConsumed;
          }*/
 
+     // When the end key is pressed and OfferKeyEventL() is called for the first time,
+     // set the edit dialog to be not editable to close the partial input
+     // screen if it is open.
+     if( aKeyEvent.iCode == EKeyEscape && !iEndKeyWasPressed )
+         {
+         SetEditableL( EFalse );
+         }
+
     // Display menu bar if the focused control doesnt consume selection keys
     CPbk2ContactEditorArrayItem* currentField = iUiFieldArray->Find(
             IdOfFocusControl());
@@ -716,19 +796,37 @@
         ret = EKeyWasConsumed;
         }
 
-    if ( ret != EKeyWasConsumed && !iEndKeyWasPressed )
+    if ( ret != EKeyWasConsumed )
         {
-        if ( aKeyEvent.iCode == EKeyEscape )
+        // If the iEndKeyWasPressed equels to true, which illustrates
+        // the EditorDlgImpl get the Escape key event one more time 
+        // for the case that Exit phonebook2 with the EditorDlg opened,
+        // sush as save VOIP settings,there will be two event,
+        // one is to close dialog and the other is to exit phonebook2. 
+        if ( iEndKeyWasPressed )
             {
-            iEditorStrategy.StopQuery();
-            iEndKeyWasPressed = ETrue;
+            if ( aKeyEvent.iCode == EKeyEscape && iAvkonAppUi->IsAppShutterRunning() )
+                {
+                // Use the iExitApp to record whether the AppShutter is running.
+                // According to the value of iExitApp to Exit Phonebook2 app ui 
+                // after the EditorDlg close completely. 
+                iExitApp = ETrue;
+                }
             }
-        ret = CAknForm::OfferKeyEventL( aKeyEvent, aType );
-        if ( ret == EKeyWasConsumed && 
-            aKeyEvent.iCode != EKeyPhoneEnd && aKeyEvent.iCode != EKeyEscape )
+        else
             {
-            UpdateCbasL();
-            }        
+            if ( aKeyEvent.iCode == EKeyEscape )
+                {
+                iEditorStrategy.StopQuery();
+                iEndKeyWasPressed = ETrue;
+                }
+            ret = CAknForm::OfferKeyEventL( aKeyEvent, aType );
+            if ( ret == EKeyWasConsumed && aKeyEvent.iCode != EKeyPhoneEnd
+                && aKeyEvent.iCode != EKeyEscape )
+                {
+                UpdateCbasL();
+                }
+            }
         }
 
     return ret;
@@ -1217,7 +1315,7 @@
 // CPbk2ContactEditorDlgImpl::AreAllFieldsEmpty
 // --------------------------------------------------------------------------
 //
-TBool CPbk2ContactEditorDlgImpl::AreAllFieldsEmpty()
+TBool CPbk2ContactEditorDlgImpl::AreAllFieldsEmptyL()
     {
     TBool result(ETrue);
     TInt countAll = iContact.PresentationFields().FieldCount();
@@ -1647,7 +1745,12 @@
                  RestorePrevNaviDecoratorL();
                  iNaviContainer = NULL;
                  }
-            MakeVisible( EFalse );
+            
+            if ( !iAvkonAppUi->IsAppShutterRunning() )
+                {
+                MakeVisible( EFalse );
+                }
+           
             MPbk2ContactEditorEventObserver::TParams params;
             params.iFlags = EPbk2EditorKeyCode;
             params.iKeyCode = aKeycode;
@@ -1965,7 +2068,7 @@
 // --------------------------------------------------------------------------
 //
 void CPbk2ContactEditorDlgImpl::CloseDialog()
-	{
+    {
     // Ignore error and close editor without further user interaction
     MVPbkContactObserver::TContactOpResult exitResult;
     exitResult.iExtension = NULL;
@@ -2665,7 +2768,7 @@
     {
     // For knowing if the destructor has been called
     TBool destroyed = EFalse;
-    iDestroyedPtr = &destroyed;
+    iDestroyedPtrForCloseDlg = &destroyed;
 
     if (aInformObserver && iParams.iActiveView
             == TPbk2ContactEditorParams::EEditorView || iAddressViewStandalone)
@@ -2698,22 +2801,21 @@
     // In VOIP/new contacts/exit case, this object will be destructed by
     // iContactObserver.ContactEditingComplete() above.
     // If this object is destructed, don't excute the following anymore
-    if ( destroyed )
+    if ( !destroyed )
         {
-        return;
-        }
-
-    // Don't save any contact data (already saved)
-    iExitRecord.Set(EOkToExitWithoutHandlingIt);
-    iExitRecord.Clear(EExitOrdered);
-
-    // Close dialog using TryExitL and returning ETrue from OkToExit
-    TInt err = KErrNone;
-        TRAP( err, TryExitL( EAknSoftkeyBack ) );
-    if (err != KErrNone)
-        {
-        // If not nicely then use the force.
-        delete this;
+        // Don't save any contact data (already saved)
+        iExitRecord.Set(EOkToExitWithoutHandlingIt);
+        iExitRecord.Clear(EExitOrdered);
+    
+        // Close dialog using TryExitL and returning ETrue from OkToExit
+        TInt err = KErrNone;
+            TRAP( err, TryExitL( EAknSoftkeyBack ) );
+        if (err != KErrNone)
+            {
+            // If not nicely then use the force.
+            delete this;
+            }
+        iDestroyedPtrForCloseDlg = NULL;
         }
     }
 
@@ -2863,30 +2965,59 @@
                 case EPbk2FieldCtrlTypeExtAddressEditor:
                 case EPbk2FieldCtrlTypeExtAddressHomeEditor:
                 case EPbk2FieldCtrlTypeExtAddressOfficeEditor:
-                    if(IsAddressValidated(Pbk2AddressTools::MapCtrlTypeToAddress(
-                            uiField->UIField()->CtrlType())))
+                    {
+                	TInt iconId = 0;
+                    // UnSync feature indicator flag and chinese flag
+                    TBool supportUnSyncFeature = 
+                          FeatureManager::FeatureSupported( 
+                          KFeatureIdFfTdUnSyncabPbfieldsInd );
+                    TBool supportChinese = 
+                        FeatureManager::FeatureSupported( KFeatureIdChinese ); 
+                    // Valid address
+                    TBool addressValidated = 
+                         IsAddressValidated( 
+                            Pbk2AddressTools::MapCtrlTypeToAddress(
+                            uiField->UIField()->CtrlType()));
+                    if(supportChinese && supportUnSyncFeature)
                         {
-                        TPbk2IconId iconID(TUid::Uid(KPbk2UID3), EPbk2qgn_prop_locev_map);
-                        uiField->LoadBitmapToFieldL(iconID);
+                        // Unsync icon
+                        iconId = EPbk2qgn_prop_phonebook2_unsync;
                         }
                     else
                         {
-                        TPbk2IconId iconID(TUid::Uid(KPbk2UID3), EPbk2qgn_prop_pb_no_valid_lm);
-                        uiField->LoadBitmapToFieldL(iconID);
+                        iconId = addressValidated ?
+                            EPbk2qgn_prop_locev_map : EPbk2qgn_prop_pb_no_valid_lm;
                         }
+                    TPbk2IconId pbkIconId(TUid::Uid(KPbk2UID3),iconId);
+                    uiField->LoadBitmapToFieldL(pbkIconId); 
+                    }
                     break;
                 case EPbk2FieldCtrlTypeExtAssignFromMapsEditor:
-                    if(IsAddressValidated( Pbk2AddressTools::MapViewTypeToAddress(iParams.iActiveView)))
+                    {
+                    // UnSync feature indicator flag and chinese flag
+                    TBool supportUnSyncFeature = 
+                           FeatureManager::FeatureSupported(
+                           KFeatureIdFfTdUnSyncabPbfieldsInd );
+                    TBool supportChinese = 
+                           FeatureManager::FeatureSupported( KFeatureIdChinese ); 
+
+                    TBool addressValidated = 
+                           IsAddressValidated( 
+                           Pbk2AddressTools::MapViewTypeToAddress( iParams.iActiveView ));
+                    TInt iconId = 0;
+                    if( supportChinese && supportUnSyncFeature )
                         {
-                          TPbk2IconId iconID(TUid::Uid(KPbk2UID3), EPbk2qgn_prop_locev_map);
-                          uiField->LoadBitmapToFieldL(iconID);
-                          }
-                      else
-                          {
-                          TPbk2IconId iconID(TUid::Uid(KPbk2UID3), EPbk2qgn_prop_pb_no_valid_lm);
-                          uiField->LoadBitmapToFieldL(iconID);
-                          }
-                    break;  
+                        iconId = EPbk2qgn_prop_phonebook2_unsync;
+                        }
+                    else
+                        {
+                        iconId = addressValidated ?
+                            EPbk2qgn_prop_locev_map : EPbk2qgn_prop_pb_no_valid_lm;
+                        }
+                    TPbk2IconId pbkIconId(TUid::Uid(KPbk2UID3),iconId);
+                    uiField->LoadBitmapToFieldL(pbkIconId); 
+                    }
+                    break;
                 default:
                     return;
                 }
@@ -2982,7 +3113,7 @@
             {
             // Estimate all field are empty by UI field.
         if (( AreAllControlsEmpty() && !iAddressViewStandalone )||
-            (iAddressViewStandalone && AreAllFieldsEmpty()))
+            (iAddressViewStandalone && AreAllFieldsEmptyL()))
                 {
                 if (iEditorExtension->OkToDeleteContactL(aParams))
                     {
@@ -3154,13 +3285,14 @@
     {
     TBool okToExit = ETrue;
 
-    // If exit callback returned EFalse, the exit is cancelled
-    if ( iParams.iExitCallback &&
-         !iParams.iExitCallback->OkToExitL( aCommandId ) )
+    // The exit callback must be invoked only once when editor dlg is exiting.
+    if ( (iParams.iActiveView == TPbk2ContactEditorParams::EEditorView || 
+            iAddressViewStandalone) && iParams.iExitCallback )
         {
-        okToExit = EFalse;
+        okToExit = iParams.iExitCallback->OkToExitL( aCommandId );
         }
-
+    
+    // If exit callback returned EFalse, the exit is cancelled
     if ( !okToExit )
         {
         iExitRecord.Clear( EExitApproved );
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorEmailField.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorEmailField.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -147,6 +147,10 @@
     iControl->CreateTextViewL();
     iCaptionedCtrl = iUiBuilder.LineControl(ControlId());
     iCaptionedCtrl->SetTakesEnterKey(EFalse);
+    
+    // Enable partial screen input
+    TInt flags = iControl->AknEditorFlags();
+    iControl->SetAknEditorFlags(flags | EAknEditorFlagEnablePartialScreen);
     }
     
 // End of File  
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorImpplField.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorImpplField.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -157,6 +157,10 @@
     iControl->CreateTextViewL();
     iCaptionedCtrl = iUiBuilder.LineControl(ControlId());
     iCaptionedCtrl->SetTakesEnterKey(EFalse);
+    
+    // Enable partial screen input
+    TInt flags = iControl->AknEditorFlags();
+    iControl->SetAknEditorFlags(flags | EAknEditorFlagEnablePartialScreen);
     }
     
 // --------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorNumberField.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorNumberField.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -105,7 +105,11 @@
         // foreign characters if necessary
         AknTextUtils::DisplayTextLanguageSpecificNumberConversion(text);
         }
-        
+
+	// Enable partial screen input
+    TInt flags = iControl->AknEditorFlags();
+    iControl->SetAknEditorFlags(flags | EAknEditorFlagEnablePartialScreen);
+    
     if (iContactField.FieldProperty().EditMode() == EPbk2FieldEditModeNumeric)
         {
         iControl->SetAknEditorNumericKeymap(EAknEditorPlainNumberModeKeymap);
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorPhoneNumberField.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorPhoneNumberField.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -187,6 +187,10 @@
     iControl->CreateTextViewL();
     iCaptionedCtrl = iUiBuilder.LineControl(ControlId());
     iCaptionedCtrl->SetTakesEnterKey(ETrue);
+    
+    // Enable partial screen input
+    TInt flags = iControl->AknEditorFlags();
+    iControl->SetAknEditorFlags(flags | EAknEditorFlagEnablePartialScreen);
     }
 
 // --------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorPostalCodeField.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorPostalCodeField.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -152,6 +152,10 @@
     iControl->CreateTextViewL();
     iCaptionedCtrl = iUiBuilder.LineControl(ControlId());
     iCaptionedCtrl->SetTakesEnterKey(ETrue);
+    
+    // Enable partial screen input
+    TInt flags = iControl->AknEditorFlags();
+    iControl->SetAknEditorFlags(flags | EAknEditorFlagEnablePartialScreen);
     }
 
 // --------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorReadingField.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorReadingField.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -137,6 +137,10 @@
     iControl->CreateTextViewL();
     iCaptionedCtrl = iUiBuilder.LineControl(ControlId());
     iCaptionedCtrl->SetTakesEnterKey(ETrue);
+    
+    // Enable partial screen input
+    TInt flags = iControl->AknEditorFlags();
+    iControl->SetAknEditorFlags(flags | EAknEditorFlagEnablePartialScreen);
     }
 
 // --------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorTextField.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorTextField.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -99,6 +99,10 @@
     // T9 should be deactivated in all contact editors always
     DeactivateT9(iContactField.FieldProperty().EditMode());
 
+    // Enable partial screen input
+    TInt flags = iControl->AknEditorFlags();
+    iControl->SetAknEditorFlags(flags | EAknEditorFlagEnablePartialScreen);
+    
     if (iContactField.FieldProperty().EditMode() == 
         EPbk2FieldEditModeLatinOnly)
         {
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorUrlField.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorUrlField.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -99,6 +99,10 @@
     // T9 should be deactivated in all contact editors always
     DeactivateT9(iContactField.FieldProperty().EditMode());
 
+    // Enable partial screen input
+    TInt flags = iControl->AknEditorFlags();
+    iControl->SetAknEditorFlags(flags | EAknEditorFlagEnablePartialScreen);    
+    
     if (iContactField.FieldProperty().EditMode() == 
             EPbk2FieldEditModeLatinOnly)
         {
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2FieldListBoxModel.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2FieldListBoxModel.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -36,7 +36,7 @@
 #include <TPbk2StoreContactAnalyzer.h>
 #include <pbk2uicontrols.rsg>
 #include "Pbk2AddressTools.h"
-
+#include <featmgr.h>
 // Virtual Phonebook
 #include <MVPbkFieldType.h>
 #include <TVPbkFieldVersitProperty.h>
@@ -48,6 +48,7 @@
 #include <vpbkeng.rsg>
 #include <MVPbkStoreContact.h>
 
+#include <Pbk2Config.hrh> // For unSync
 /// Unnamed namespace for local definitions
 namespace {
 
@@ -697,18 +698,25 @@
     // Format icon index
     TBuf<KMaxFormattedTIntLength> iconText; 
     TInt iconIndex = KErrNotFound;
-    
-    if ( IsGeoFieldForAddressL( aField ) )
+    TInt iconId = 0;
+    // UnSync feature indicator flag and chinese flag
+    TBool supportUnSyncFeature = FeatureManager::FeatureSupported(
+    		KFeatureIdFfTdUnSyncabPbfieldsInd);
+    TBool supportChinese = FeatureManager::FeatureSupported(KFeatureIdChinese);
+    // Valid address
+    TBool addressValidated = IsGeoFieldForAddressL( aField );
+    if( supportChinese && supportUnSyncFeature)
         {
-        iconIndex = aParams.iIconArray.FindIcon(
-            TPbk2AppIconId( EPbk2qgn_prop_locev_map ) );
+        // UnSync Icon
+        iconId = EPbk2qgn_prop_phonebook2_unsync;
         }
     else
-    	{
-        iconIndex = aParams.iIconArray.FindIcon(
-    	    TPbk2AppIconId( EPbk2qgn_prop_pb_no_valid_lm ) );
-    	}
-
+        {
+        iconId = addressValidated ?
+            EPbk2qgn_prop_locev_map : EPbk2qgn_prop_pb_no_valid_lm;
+        }
+    TPbk2IconId pbkIconId(TUid::Uid(KPbk2UID3), iconId);
+    iconIndex = aParams.iIconArray.FindIcon(pbkIconId); 
     iconText.Num( iconIndex );
     aRow.AppendColumnL( iconText );
     }
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2NamesListControl.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2NamesListControl.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -1441,6 +1441,8 @@
 void CPbk2NamesListControl::SizeChanged()
     {
     iCurrentState->SizeChanged();
+    // Reset the popup char flag so that the char will not be shown.
+    iListBox->ResetShowPopupChar();
     }
 
 // --------------------------------------------------------------------------
@@ -2427,7 +2429,9 @@
             {
             if( iCurrentState->NamesListState() == EStateEmpty )
                 {
-                SelectAndChangeReadyStateL();
+                // Trap the function because it may leave.
+                TRAPD( res, SelectAndChangeReadyStateL() );
+                HandleError( res );
                 }
             }
         else
--- a/phonebookui/Phonebook2/USIMExtension/inc/CPsu2FixedDialingView.h	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/USIMExtension/inc/CPsu2FixedDialingView.h	Wed Sep 15 11:56:55 2010 +0300
@@ -24,6 +24,8 @@
 #include <MPbk2EditedContactObserver.h>
 #include <MVPbkSingleContactOperationObserver.h>
 #include <MVPbkContactObserver.h>
+#include <aknmarkingmodeobserver.h>
+
 
 // FORWARD DECLARATIONS
 class CAknNavigationControlContainer;
@@ -45,7 +47,8 @@
 class CPsu2FixedDialingView : public CPsu2NameListViewBase,
                               public MPbk2EditedContactObserver,
                               public MVPbkSingleContactOperationObserver,
-                              public MVPbkContactObserver                                  
+                              public MVPbkContactObserver,
+                              public MAknMarkingModeObserver
     {
     public:  // Constructors and destructor
        
@@ -85,6 +88,25 @@
         void HandleControlEventL(
             MPbk2ContactUiControl& aControl,
             const TPbk2ControlEvent& aEvent );
+        
+    public: // From MAknMarkingModeObserver 
+            
+        /**
+         * This method is called when marking mode is activated or deactivated.
+         * 
+         * @param aActivated @c ETrue if marking mode was activate, @c EFalse
+         *                   if marking mode was deactivated.
+         */
+        void MarkingModeStatusChanged( TBool aActivated );
+
+        /**
+         * This method is called just before marking mode is closed. Client can 
+         * either accept or decline closing.
+         * 
+         * @return @c ETrue if marking mode should be closed, otherwise @c EFalse.
+         */
+        TBool ExitMarkingMode() const;
+
 
     private: // From CPsu2NameListViewBase
         void UpdateCbasL();
@@ -160,6 +182,9 @@
         
         /// Ref: Eliminator of current contact editing dialog
         MPbk2DialogEliminator* iDlgEliminator;
+        // Flag to indicate whether Marking mode is active
+        TBool iMarkingModeOn;
+
     };
 
 #endif // CPSU2FIXEDDIALINGVIEW_H
--- a/phonebookui/Phonebook2/USIMExtension/rss/Pbk2USimFixedDialingView.rss	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/USIMExtension/rss/Pbk2USimFixedDialingView.rss	Wed Sep 15 11:56:55 2010 +0300
@@ -51,11 +51,11 @@
             },
         MENU_TITLE
             {
-            menu_pane = r_psu2_fixed_dialing_copy_menupane;
+            menu_pane = R_AVKON_MENUPANE_MARK_MULTIPLE;
             },
         MENU_TITLE
             {
-            menu_pane = R_AVKON_MENUPANE_MARKABLE_LIST;
+            menu_pane = r_psu2_fixed_dialing_copy_menupane;
             },
         MENU_TITLE
             {
--- a/phonebookui/Phonebook2/USIMExtension/src/CPsu2FdnContactEditorPhoneNumberField.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/USIMExtension/src/CPsu2FdnContactEditorPhoneNumberField.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -208,8 +208,10 @@
     iControl->CreateTextViewL();
     iCaptionedCtrl = iUiBuilder.LineControl( ControlId() );
     iCaptionedCtrl->SetTakesEnterKey( ETrue );
-
-
+    
+    // Enable partial screen input
+    TInt flags = iControl->AknEditorFlags();
+    iControl->SetAknEditorFlags(flags | EAknEditorFlagEnablePartialScreen);
     }
 
 // -----------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/USIMExtension/src/CPsu2FixedDialingView.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/USIMExtension/src/CPsu2FixedDialingView.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -149,7 +149,8 @@
         CPbk2UIExtensionView& aExtensionView,
         CPsu2ViewManager& aViewManager ) :
     CPsu2NameListViewBase( aExtensionView, aViewManager ),
-    iShowFdnNotActiveNote( ETrue )
+    iShowFdnNotActiveNote( ETrue ),
+    iMarkingModeOn( EFalse )
     {
     }
 
@@ -524,11 +525,6 @@
                     {
                     aMenuPane->SetItemDimmed( EPsu2CmdNewContact , ETrue );
                     aMenuPane->SetItemDimmed( EPbk2CmdEditMe , ETrue );
-                    aMenuPane->SetItemSpecific( EPbk2CmdDeleteMe, EFalse );
-                    }
-                else
-                    {
-                    aMenuPane->SetItemSpecific( EPbk2CmdDeleteMe, ETrue );
                     }
                 }
             break;
@@ -540,16 +536,25 @@
                 {
                 aMenuPane->SetItemDimmed( EPbk2CmdCopy, ETrue );
                 }
-            if ( marked )
+            break;
+            }
+        case R_AVKON_MENUPANE_MARK_MULTIPLE:
                 {
-                aMenuPane->SetItemSpecific( EPbk2CmdCopy, EFalse );
-                aMenuPane->SetItemDimmed( EPsu2CmdCopyFromContacts, ETrue );
-                }
-            else
-                {
-                aMenuPane->SetItemSpecific( EPbk2CmdCopy, ETrue);
-                }
-            break;
+                TInt markedContactCount = 0;
+              
+                CCoeControl* ctrl = iControl->ComponentControl(0);
+                CEikListBox* listbox = static_cast <CEikListBox*> (ctrl);
+                if ( listbox )
+                    {
+                    markedContactCount = listbox->SelectionIndexes()->Count();
+                    }
+                // dim the makr all item if all contacts are marked. 
+                if ( markedContactCount > 0 && markedContactCount == iControl->NumberOfContacts() )
+                    {
+                    aMenuPane->SetItemDimmed( EAknCmdMarkingModeMarkAll, ETrue );
+                    }
+             
+                break;
             }
         case R_PSU2_FIXED_DIALING_DELETE_MENUPANE:
             {
@@ -726,6 +731,29 @@
     CCoeEnv::Static()->HandleError(aErrorCode);
     }    
 
+// -----------------------------------------------------------------------------
+// CPsu2FixedDialingView::MarkingModeStatusChanged
+// -----------------------------------------------------------------------------
+//
+void CPsu2FixedDialingView::MarkingModeStatusChanged( TBool aActivated )
+    {
+    iMarkingModeOn = aActivated;
+    }
+
+// -----------------------------------------------------------------------------
+// CPsu2FixedDialingView::ExitMarkingMode
+// Called by avkon, if the return value is ETrue, 
+// the Marking mode will be canceled after any operation, 
+// otherwise the Marking mode keep active.
+// -----------------------------------------------------------------------------
+//
+TBool CPsu2FixedDialingView::ExitMarkingMode() const
+    {
+    return ETrue; 
+    }
+    
+
+
 // --------------------------------------------------------------------------
 // CPsu2FixedDialingView::UpdateNaviPaneTextL
 // --------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/data/ccappcommlauncherpluginrsc.rss	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/data/ccappcommlauncherpluginrsc.rss	Wed Sep 15 11:56:55 2010 +0300
@@ -142,6 +142,11 @@
             command = ECCAppCommLauncherVoiceTagDetailsCmd; 
             txt = "";//will be filled dynamically by AIW 
             },
+        MENU_ITEM 
+            { 
+            command = ECCAppCommLauncherSendBCardCmd; 
+            txt = qtn_bcard_opt_send_entry_via; 
+            },
 #ifdef __SERIES60_HELP            
         MENU_ITEM 
             { 
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/group/ccappcommlauncherplugin.mmp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/group/ccappcommlauncherplugin.mmp	Wed Sep 15 11:56:55 2010 +0300
@@ -53,12 +53,13 @@
 
 APP_LAYER_SYSTEMINCLUDE
 SYSTEMINCLUDE   /epoc32/include/ecom
-SYSTEMINCLUDE   ../../../inc ../../../commands/inc  //phonebook2/inc internal headers
+SYSTEMINCLUDE   ../../../inc //phonebook2/inc internal headers
 
 USERINCLUDE     ../../inc //ccapplication/inc
 USERINCLUDE     ../../ccapp/ccapputil/inc
 USERINCLUDE     ../../../../../ccservices/cmsservices/cmsengine/inc
 USERINCLUDE     . ../inc
+USERINCLUDE	../../../commands/inc
 
 LIBRARY         euser.lib 
 LIBRARY         ecom.lib
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/CCCAppCommLauncherPbkCmd.h	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/CCCAppCommLauncherPbkCmd.h	Wed Sep 15 11:56:55 2010 +0300
@@ -75,6 +75,7 @@
     void ExecutePbk2CmdRemoveImageL( const TDesC8& aContact );
     void ExecutePbk2CmdAddImageL( const TDesC8& aContact );
     void ExecutePbk2CmdDeleteL( const TDesC8& aContact );
+    void ExecutePbk2CmdSendBCardL( const TDesC8& aContact );
     TBool IsPbk2CommandRunning();
     //Close all the pending pbk2commands launched from CCA
     void DeleteAllRunningCmd();
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlauncher.hrh	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlauncher.hrh	Wed Sep 15 11:56:55 2010 +0300
@@ -32,6 +32,7 @@
     ECCAppCommLauncherStylusRemoveImageCmd,
     ECCAppCommLauncherStylusAddImageCmd,
     ECCAppCommLauncherDeleteCmd,
+    ECCAppCommLauncherSendBCardCmd,
     // KAiwCmdAssign AIW service cmd used as Edit Options-menu item
     // set AIW commands at last
     ECCAppCommLauncherAiwBaseCmd = 1000 // leave this last
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlaunchermenuhandler.h	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlaunchermenuhandler.h	Wed Sep 15 11:56:55 2010 +0300
@@ -166,6 +166,7 @@
     void DoSetDefaultCmdL();
     void DoShowOnMapCmdL();
     void DoDeleteCmdL();
+    void DoSendBCardCmdL();
     
     /**
      * Handlers for Aiw-based commands
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/CCCAppCommLauncherPbkCmd.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/CCCAppCommLauncherPbkCmd.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -377,6 +377,39 @@
     }
 
 // ---------------------------------------------------------------------------
+// CCCAppCommLauncherMenuHandler::ExecutePbk2CmdSendBCardL
+// ---------------------------------------------------------------------------
+//
+void CCCAppCommLauncherPbkCmd::ExecutePbk2CmdSendBCardL( const TDesC8& aContact )
+    {
+    TCCAppCommandState& cmdState( iPlugin.CommandState() );
+    if ( !cmdState.IsRunning() )
+        {
+        cmdState.SetRunningAndPushCleanupL();
+        
+        iPbk2CommandId = EPbk2CmdSend;
+        
+        if( iLinks )
+            {
+            delete iLinks;
+            iLinks = NULL;
+            }
+        
+        iLinks = iAppServices->ContactManager().CreateLinksLC( aContact );   
+        
+        if ( iLinks->Count() > 0 )
+            {       
+            // operation completes by StoreReady,
+            //  StoreUnavailable or HandleStoreEventL
+            ( iLinks->At( 0 ) ).ContactStore().OpenL( *this );
+            }
+        
+        CleanupStack::Pop( 1 ); // iLinks (deleted in destructor)
+        cmdState.PopCleanup();
+        }
+    }
+
+// ---------------------------------------------------------------------------
 // CCCAppCommLauncherMenuHandler::HandleError
 // ---------------------------------------------------------------------------
 //
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherlpadmodel.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherlpadmodel.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -971,11 +971,21 @@
         presData.PreparePresenceDataL( iPresenceIconSize );
         TUint32 serviceType = presData.ServiceType();      
         
+        // The ownerships of mask and bitmap are transferred to this object. 
+        CFbsBitmap* mask = presData.Mask();
+        CFbsBitmap* bitmap = presData.Bitmap();       
+        TBool isValidBitmap = !( bitmap && ( NULL == bitmap->Handle() ) );
+        
+        // If any one of below condition is satisfied, the bitmap and mask are invalid. 
+        // Delete them since the ownerships of them are transferred to this object.
+        if ( !isValidBitmap || serviceType != CCmsContactFieldItem::ECmsPresenceChatNotification )
+        	{
+            delete mask;
+            delete bitmap;
+        	}
+        
         if ( serviceType == CCmsContactFieldItem::ECmsPresenceChatNotification )
-            {
-            CFbsBitmap* mask = presData.Mask();
-            CFbsBitmap* bitmap = presData.Bitmap();
-            
+            {       
             // Find the index for chat item
         	TInt index = KErrNotFound;
         	const TInt dataCount = iButtonDataArray.Count();
@@ -994,41 +1004,35 @@
         	    TBool hasPresenceIcon = iButtonDataArray[ index ].iFlags & 
 			                TCommLauncherButtonData::EHasPresenceIcon;
         	
-                if ( bitmap && ( NULL == bitmap->Handle() ) )
+                if ( hasPresenceIcon )
             	    {
-            	    if ( hasPresenceIcon )
-            		    {
-            		    // Delete presence icon from icon array 
-            		    iButtonDataArray[ index ].iFlags &= ~(TCommLauncherButtonData::EHasPresenceIcon);
-            		    iButtonIconArray->Delete( EPresenceIconIndex );
-            		    }
+                    if ( isValidBitmap )
+                    	{
+    		            // Update presence icon
+        	            iButtonIconArray->At( EPresenceIconIndex )->SetBitmap(bitmap);
+        	            iButtonIconArray->At( EPresenceIconIndex )->SetMask(mask); 
+                    	}
+                    else
+                    	{
+        		        // Delete presence icon from icon array 
+        		        iButtonDataArray[ index ].iFlags &= ~(TCommLauncherButtonData::EHasPresenceIcon);
+        		        CGulIcon* icon = iButtonIconArray->At( EPresenceIconIndex );
+        		        delete icon;
+        		        iButtonIconArray->Delete( EPresenceIconIndex );
+                    	}          		    
             	    }
-                else if ( bitmap )
-                    {           	       	
-            	    if ( hasPresenceIcon )
-            		    {
-            		    // Update presence icon
-                	    iButtonIconArray->At( EPresenceIconIndex )->SetBitmap(bitmap);
-                	    iButtonIconArray->At( EPresenceIconIndex )->SetMask(mask);
-            		    }
-            	    else
-            		    { 
-            		    // Append presence icon to icon array
-                        CGulIcon* icon = CGulIcon::NewLC();
-                        icon->SetBitmap( bitmap );
-                        icon->SetMask( mask );
-                	    iButtonIconArray->AppendL( icon );
-                	    iButtonDataArray[ index ].iFlags |= TCommLauncherButtonData::EHasPresenceIcon;
-                	    CleanupStack::Pop(); // icon
-            		    }
-                    }
+                else if ( isValidBitmap )
+                	{
+    		        // Append presence icon to icon array
+                    CGulIcon* icon = CGulIcon::NewLC();
+                    icon->SetBitmap( bitmap );
+                    icon->SetMask( mask );
+        	        iButtonIconArray->AppendL( icon );
+        	        iButtonDataArray[ index ].iFlags |= TCommLauncherButtonData::EHasPresenceIcon;
+        	        CleanupStack::Pop(); // icon
+                	}                  
         		}
             }
-        else
-            {
-            delete presData.Bitmap();
-            delete presData.Mask();
-            }
         }
     }
 
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlaunchermenuhandler.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlaunchermenuhandler.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -374,6 +374,9 @@
         case ECCAppCommLauncherDeleteCmd:
             DoDeleteCmdL();
             break;
+        case ECCAppCommLauncherSendBCardCmd:
+            DoSendBCardCmdL();
+            break;
         default:
             break;
         }
@@ -647,6 +650,22 @@
     }
 
 // ---------------------------------------------------------------------------
+// CCCAppCommLauncherMenuHandler::DoSendBCardCmdL
+// ---------------------------------------------------------------------------
+//
+void CCCAppCommLauncherMenuHandler::DoSendBCardCmdL()
+    {
+    if( !iPbkCmd )
+        {
+        iPbkCmd = CCCAppCommLauncherPbkCmd::NewL( iPlugin );
+        }
+    iPbkCmd->ExecutePbk2CmdSendBCardL(
+        *iPlugin.ContactHandler().ContactIdentifierLC() );
+
+    CleanupStack::PopAndDestroy( 1 ); // ContactIdentifierLC
+    }
+
+// ---------------------------------------------------------------------------
 // CCCAppCommLauncherMenuHandler::XspContactDynInitMenuPaneL
 // ---------------------------------------------------------------------------
 //
--- a/phonebookui/Phonebook2/ccapplication/ccacontactorservice/inc/ccacontactorserviceoperator.h	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacontactorservice/inc/ccacontactorserviceoperator.h	Wed Sep 15 11:56:55 2010 +0300
@@ -79,50 +79,6 @@
     void ConstructL();
 
 private: //new methods
-    /**
-     * Helper class for handling special cases.
-     * Currently VOIP ServiceID implemented.
-     *
-     * @param aFieldData: Selected field.
-     * @since S60 5.0
-     */
-    void ResolveSpecialCasesL(const TDesC& aFieldData);
-
-    /**
-     * Helper class for searching ServiceID
-     *
-     * @param aFieldData: Selected field.
-     * @return ServiceId
-     * @since S60 5.0
-     */
-    TUint32 ResolveServiceIdL(const TDesC& aFieldData);
-
-    /**
-     * Helper class for parsing xSP identification.
-     *
-     * @param aFieldData: Selected field.
-     * @param aXSPId: Found xSP ID.
-     * @return boolean if xSP is found.
-     * @since S60 5.0
-     */
-    TBool ExtractServiceL(const TDesC& aFieldData, TPtrC& aXSPId);
-
-    /**
-     * Helper class for searching ServiceId from spsettings
-     *
-     * @param aFieldData: Selected field.
-     * @return ServiceId
-     * @since S60 5.0
-     */
-    TUint32 SearchServiceIdL(const TDesC& aFieldData);
-
-    /**
-     * Helper class for checking if MSISDN addressing is supported.
-     *
-     * @return ServiceId
-     * @since S60 5.0
-     */
-    TUint32 ResolveMSISDNAddressingSupportedL();
 
     /**
      * Helper class for starting communication method.
@@ -157,12 +113,6 @@
      * Not own.
      */
     const CCAContactorService::TCSParameter* iParameter;
-
-    /**
-     * ServiceId for VOIP service.
-     * Own.
-     */
-    TUint32 iServiceId;
     
     /**
      * Is call item selected
--- a/phonebookui/Phonebook2/ccapplication/ccacontactorservice/src/ccacontactorserviceoperator.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccacontactorservice/src/ccacontactorserviceoperator.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -17,6 +17,7 @@
 
 #include <e32std.h>
 #include <s32mem.h>
+#include <spsettingsvoiputils.h>
 
 #include "ccacontactorserviceheaders.h"
 
@@ -122,9 +123,6 @@
         result = iParameter->iSelectedField;
         }
 
-    // Resolve special cases
-    TRAP(err, ResolveSpecialCasesL(*result));
-
     if (KErrNone != err)
         {
         CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::ExecuteL: ResolveSpecialCasesL: Leaves %d."), err);
@@ -153,7 +151,6 @@
 // --------------------------------------------------------------------------
 //
 CCCAContactorServiceOperator::CCCAContactorServiceOperator():
-    iServiceId((TUint32)KErrNotFound),
     isSelected(EFalse)
     {
     }
@@ -172,225 +169,6 @@
     }
 
 // --------------------------------------------------------------------------
-// CCCAContactorServiceOperator::ResolveSpecialCasesL
-// --------------------------------------------------------------------------
-//
-void CCCAContactorServiceOperator::ResolveSpecialCasesL(const TDesC& aFieldData)
-    {
-    CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::ResolveSpecialCasesL"));
-
-    /*
-     * Currently only VOIP ServiceId is needed to find out.
-     */
-    switch(iParameter->iCommTypeSelector)
-        {
-        case VPbkFieldTypeSelectorFactory::EVOIPCallSelector:
-            iServiceId = ResolveServiceIdL(aFieldData);
-            break;
-        }
-
-    CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::ResolveSpecialCasesL: Done."));
-    }
-
-// --------------------------------------------------------------------------
-// CCCAContactorServiceOperator::ResolveServiceIdL
-// --------------------------------------------------------------------------
-//
-TUint32 CCCAContactorServiceOperator::ResolveServiceIdL(const TDesC& aFieldData)
-    {
-    CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::ResolveServiceIdL"));
-
-    __ASSERT_ALWAYS (NULL != &aFieldData, User::Leave (KErrArgument));
-    __ASSERT_ALWAYS (0 < aFieldData.Size(), User::Leave (KErrArgument));
-
-    TUint32 ret = (TUint32)KErrNotFound;
-
-    //LOGIC:
-    /*
-     * 1. Find out is there xSP prefix
-     * 2. If there is, search service id
-     * 3. If not, find out how many services support msisdn
-     * 4. If only one, find use that service id
-     * 5. If more than one, do not use service id.
-     */
-
-    TPtrC result;
-
-    // 1. Find out is there xSP prefix
-    if (ExtractServiceL(aFieldData, result))
-        {
-        CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::ResolveServiceIdL: ExtractServiceL found."));
-
-        // 2. If there is, search service id
-        ret = SearchServiceIdL(result);
-        }
-    else
-        {
-        CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::ResolveServiceIdL: ExtractServiceL not found."));
-
-        // 3. If not, find out how many services support msisdn
-        ret = ResolveMSISDNAddressingSupportedL();
-        if ((TUint32)KErrNotFound != ret)
-            {
-            // 4. If only one, find use that service id
-            CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::ResolveServiceIdL: ResolveMSISDNAddressingSupportedL only one service."));
-
-            }
-        else
-            {
-            // 5. If more than one or none found, do not use service id.
-            CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::ResolveServiceIdL: ResolveMSISDNAddressingSupportedL more than one service."));
-
-            }
-        }
-
-    CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::ResolveServiceIdL: Done."));
-
-    return ret;
-    }
-
-// --------------------------------------------------------------------------
-// CCCAContactorServiceOperator::ExtractServiceL
-// --------------------------------------------------------------------------
-//
-TBool CCCAContactorServiceOperator::ExtractServiceL(
-    const TDesC& aFieldData, TPtrC& aXSPId)
-    {
-    CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::ExtractServiceL"));
-
-    TBool found = EFalse;
-
-    TInt pos = aFieldData.Find(KColon);
-    if (pos >= 0)
-        {
-        // ok input
-        aXSPId.Set(aFieldData.Left(pos));
-        found = ETrue;
-        }
-
-    CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::ExtractServiceL: Done."));
-
-    return found;
-    }
-
-// --------------------------------------------------------------------------
-// CCCAContactorServiceOperator::SearchServiceIdL
-// --------------------------------------------------------------------------
-//
-TUint32 CCCAContactorServiceOperator::SearchServiceIdL(const TDesC& aFieldData)
-    {
-    CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::SearchServiceIdL"));
-
-    TUint32 ret = (TUint32)KErrNotFound;
-    TInt err = KErrNone;
-    CDesCArrayFlat* nameArray = NULL;
-
-    RIdArray ids;
-    CleanupClosePushL(ids);
-
-    nameArray = new (ELeave) CDesCArrayFlat(2);
-    CleanupStack::PushL(nameArray);
-
-    CSPSettings* settings = CSPSettings::NewLC();
-
-    err = settings->FindServiceIdsL(ids);
-    User::LeaveIfError(err);
-    err = settings->FindServiceNamesL(ids, *nameArray);
-    User::LeaveIfError(err);
-
-    TInt count = nameArray->MdcaCount();
-    for (TInt i(0); i < count; i++)
-        {
-        // search the mathching service name
-        TPtrC p = nameArray->MdcaPoint(i);
-        if (!p.CompareF(aFieldData))
-            {
-            // Service found
-            ret = ids[i];
-
-            CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::SearchServiceIdL: Service found."));
-            break;
-            }
-        }
-    CleanupStack::PopAndDestroy(3); // ids, nameArray, settings
-
-    CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::SearchServiceIdL: Done."));
-
-    return ret;
-    }
-
-// --------------------------------------------------------------------------
-// CCCAContactorServiceOperator::ResolveMSISDNAddressingSupportedL
-// --------------------------------------------------------------------------
-//
-TUint32 CCCAContactorServiceOperator::ResolveMSISDNAddressingSupportedL()
-    {
-    CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::ResolveMSISDNAddressingSupportedL"));
-
-    /*
-     * LOGIC:
-     * -Find out services
-     * -If only 1 service, return the serviceid
-     * -If services are more than 1, then do not use serviceid.
-     */
-
-    TInt err = KErrNone;
-    TInt foundNo = 0;
-    TUint32 ret = (TUint32)KErrNotFound;
-
-    RIdArray ids;
-    CleanupClosePushL(ids);
-
-    CSPSettings* settings = CSPSettings::NewLC();
-
-    err = settings->FindServiceIdsL(ids);
-    User::LeaveIfError(err);
-
-    TInt count = ids.Count();
-    for (TInt i(0); i < count; i++)
-        {
-        CSPProperty* property = CSPProperty::NewLC();
-
-        // Find out property
-        err = settings->FindPropertyL(ids[i],
-            EPropertyServiceAttributeMask, *property);
-
-        // If service have property
-        if (KErrNone == err)
-            {
-            // read the value of mask property
-            TInt mask = 0;
-            err = property->GetValue(mask);
-            if (KErrNone == err)
-                {
-                if ((mask & ESupportsMSISDNAddressing) &&
-                    (mask & ESupportsInternetCall))
-                    {
-                    // Found one.
-                    ret = ids[i];
-                    foundNo++;
-
-                    }// if mask
-                }// if err
-            }// if err
-
-        CleanupStack::PopAndDestroy(property);
-        }// for
-
-    // If more than 1 service, do not use serviceid
-
-    if (1 < foundNo)
-    {
-        ret = (TUint32)KErrNotFound;
-    }
-
-    CleanupStack::PopAndDestroy(2); // ids, settings
-
-    CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::ResolveMSISDNAddressingSupportedL: Done."));
-    return ret;
-    }
-
-// --------------------------------------------------------------------------
 // CCCAContactorServiceOperator::LaunchCommunicationMethodL
 // --------------------------------------------------------------------------
 //
@@ -401,8 +179,12 @@
 
     __ASSERT_ALWAYS (NULL != &iParameter->iFullName, User::Leave (KErrArgument));
     
-    // If serviceid found, use it.
-    if ((TUint32)KErrNotFound != iServiceId)
+    // If there is a default service, use the service 
+    TUint serviceId = 0;
+    CSPSettingsVoIPUtils* spSettings = CSPSettingsVoIPUtils::NewLC();
+    
+    if ( ( iParameter->iCommTypeSelector == VPbkFieldTypeSelectorFactory::EVOIPCallSelector ) &&
+    		( !spSettings->GetPreferredService( serviceId ) ) )
         {
         CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::ExecuteL: ExecuteServiceL with serviceid"));
         CCAContactor::ExecuteServiceL(
@@ -410,7 +192,7 @@
             aFieldData,
             iParameter->iFullName,
             iParameter->iContactLinkArray,
-            iServiceId
+            serviceId
             );
         }
     else
@@ -421,7 +203,9 @@
             aFieldData,
             iParameter->iFullName,
             iParameter->iContactLinkArray);
-        }
+    	}
+    
+    CleanupStack::PopAndDestroy( spSettings );
 
     CCA_DP(KCCAContactorServiceLoggerFile, CCA_L("CCCAContactorServiceOperator::LaunchCommunicationMethodL: Done."));
     }
--- a/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/group/ccappdetailsviewplugin.mmp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/group/ccappdetailsviewplugin.mmp	Wed Sep 15 11:56:55 2010 +0300
@@ -83,5 +83,6 @@
 LIBRARY         spdctrl.lib
 DEBUGLIBRARY    flogger.lib
 LIBRARY         ccacontactorservice.lib
+LIBRARY         featmgr.lib          // To check Unsync icon feature
 
 // End of File
--- a/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/src/ccappdetailsviewlistboxmodel.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/src/ccappdetailsviewlistboxmodel.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -60,6 +60,7 @@
 #include <TVPbkFieldTypeParameters.h>
 #include <TVPbkFieldVersitProperty.h>
 #include <StringLoader.h>
+#include <featmgr.h>
 #include <TPbk2AppIconId.h>
 
 #include <aknlists.h>
@@ -68,6 +69,8 @@
 #include <vpbkeng.rsg>
 #include <pbk2uicontrols.rsg>
 
+#include <Pbk2Config.hrh>
+
 #include "ccappdetailsviewlistboxmodel.h"
 #include "ccappdetailsviewdefs.h"
 #include <ccappdetailsviewpluginrsc.rsg>
@@ -924,18 +927,26 @@
                 // add icon.
                 buffer.Zero();
                 TInt iconIndex = 0;
-                if (IsAddressValidated(groupId))
-                {
-                    TPbk2IconId iconId(TUid::Uid(KPbk2UID3), EPbk2qgn_prop_locev_map);
-                    iconIndex = iIconArray.FindIcon(iconId);
-                    buffer.AppendNum(iconIndex);
-                }
+                TInt iconId = 0;
+                // UnSync feature indicator flag and chinese flag
+                TBool supportUnSyncFeature = FeatureManager::FeatureSupported(
+                KFeatureIdFfTdUnSyncabPbfieldsInd);
+                TBool supportChinese = FeatureManager::FeatureSupported(KFeatureIdChinese);
+                // Valid address
+                TBool addressValidated = IsAddressValidated(groupId); 
+                if(supportChinese && supportUnSyncFeature)
+                    {   
+                    // UnSync Icon
+                    iconId = EPbk2qgn_prop_phonebook2_unsync;
+                    }
                 else
-                {
-                    TPbk2IconId iconId(TUid::Uid(KPbk2UID3), EPbk2qgn_prop_pb_no_valid_lm);
-                    iconIndex = iIconArray.FindIcon(iconId);
-                    buffer.AppendNum(iconIndex);
-                }
+                    {
+                    iconId = addressValidated ?
+                        EPbk2qgn_prop_locev_map : EPbk2qgn_prop_pb_no_valid_lm;
+                    }
+                TPbk2IconId pbkIconId( TUid::Uid(KPbk2UID3),iconId );
+                iconIndex = iIconArray.FindIcon(pbkIconId);
+                buffer.AppendNum(iconIndex); 
                 row->AppendColumnL(buffer);
 
                 // add label.
--- a/phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycardplugin.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycardplugin.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -236,6 +236,9 @@
     {
     CCA_DP(KMyCardLogFile, CCA_L("->CCCAppMyCardPlugin::DoDeactivate()"));
 
+    // iOwnContainer should update command to reset the UiControl when deactivated.
+    iOwnContainer->UpdateAfterCommandExecution();
+    
     // Forward the deactivation-call to base-class
     CCCAppViewPluginAknView::DoDeactivate();
 
--- a/phonebookui/Phonebook2/group/Pbk2GroupExtension.mmp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/group/Pbk2GroupExtension.mmp	Wed Sep 15 11:56:55 2010 +0300
@@ -74,6 +74,7 @@
 
 // Include paths
 USERINCLUDE     ../GroupExtension/inc
+USERINCLUDE     ../commands/inc
 SYSTEMINCLUDE   ../inc
 APP_LAYER_SYSTEMINCLUDE
 
--- a/phonebookui/Phonebook2/group/Pbk2Presentation.mmp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/group/Pbk2Presentation.mmp	Wed Sep 15 11:56:55 2010 +0300
@@ -126,6 +126,14 @@
 LANGUAGE_IDS
 END
 
+// UnSync icon resource file
+START RESOURCE ../rss/Pbk2PresentationChineseUnSync.rss
+DEPENDS vpbkeng.rsg
+HEADER
+TARGET Pbk2PresentationChineseUnSync
+TARGETPATH RESOURCE_FILES_DIR
+LANGUAGE_IDS
+END
 
 // Include paths
 USERINCLUDE     ../Presentation/inc ../Presentation/rss
--- a/phonebookui/Phonebook2/group/iconlist.txt	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/group/iconlist.txt	Wed Sep 15 11:56:55 2010 +0300
@@ -25,4 +25,5 @@
 /c8,8 qgn_prop_pb_topc
 /c8,8 qgn_prop_locev_map.svg
 /c8,8 qgn_prop_pb_no_valid_lm.svg
-/c8,8 qgn_prop_blid_waypoint.svg
\ No newline at end of file
+/c8,8 qgn_prop_blid_waypoint.svg
+/c8,8 qgn_prop_cmcc_unsync.svg
\ No newline at end of file
--- a/phonebookui/Phonebook2/inc/Pbk2Icons.hrh	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/inc/Pbk2Icons.hrh	Wed Sep 15 11:56:55 2010 +0300
@@ -185,6 +185,10 @@
 #define qgn_prop_radiobutt_off              EMbmAvkonQgn_prop_radiobutt_off
 #define qgn_prop_radiobutt_off_mask         EMbmAvkonQgn_prop_radiobutt_off_mask
 
+/// UnSync icon
+#define qgn_prop_phonebook2_unsync              EMbmPhonebook2Qgn_prop_cmcc_unsync
+#define qgn_prop_phonebook2_unsync_mask         EMbmPhonebook2Qgn_prop_cmcc_unsync_mask
+
 //// Phonebook2 bitmap file location and name
 #define phonebook2_mbm_file_location     "z:\\resource\\apps\\Phonebook2.mif"
 
--- a/phonebookui/Phonebook2/rom/Phonebook2Resources.iby	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Phonebook2/rom/Phonebook2Resources.iby	Wed Sep 15 11:56:55 2010 +0300
@@ -29,6 +29,7 @@
 data=DATAZ_\RESOURCE_FILES_DIR\Pbk2Presentation.rsc     RESOURCE_FILES_DIR\Pbk2Presentation.rsc
 data=DATAZ_\RESOURCE_FILES_DIR\Pbk2PresentationChinese.rsc RESOURCE_FILES_DIR\Pbk2PresentationChinese.rsc
 data=DATAZ_\RESOURCE_FILES_DIR\Pbk2PresentationJapanese.rsc RESOURCE_FILES_DIR\Pbk2PresentationJapanese.rsc
+data=DATAZ_\RESOURCE_FILES_DIR\Pbk2PresentationChineseUnSync.rsc RESOURCE_FILES_DIR\Pbk2PresentationChineseUnSync.rsc
 
 data=DATAZ_\RESOURCE_FILES_DIR\Pbk2UIControls.rsc       RESOURCE_FILES_DIR\Pbk2UIControls.rsc
 data=DATAZ_\RESOURCE_FILES_DIR\Pbk2Commands.rsc         RESOURCE_FILES_DIR\Pbk2Commands.rsc
--- a/phonebookui/Speeddial/src/SpdiaAppUi.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/phonebookui/Speeddial/src/SpdiaAppUi.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -143,17 +143,6 @@
     {
     FeatureManager::UnInitializeLib();
     
-    // We had gone to some other application using active application..
-	// We are coming back..Restore the GridStatus..
-	if(iSpeedPrivate!=NULL)
-	{
-	if(iSpeedPrivate->State() == CSpeedDialPrivate::STATE_IDLE && 
-		iSpeedPrivate->GridStatus() == CSpeedDialPrivate::EGridNoUse )
-	{
-		iSpeedPrivate->SetGridStatus(CSpeedDialPrivate::EGridUse);
-	}
-	}
-
 	 CSpdiaView* view = dynamic_cast<CSpdiaView*>(View( KViewId ));
 	 if ( view )
 	     {
--- a/pimprotocols/pbap/inc/pbapvcardexporterutil.h	Tue Sep 14 20:54:53 2010 +0300
+++ b/pimprotocols/pbap/inc/pbapvcardexporterutil.h	Wed Sep 15 11:56:55 2010 +0300
@@ -63,6 +63,7 @@
 private:
 	CPbapVCardExporterUtil(CContactDatabase& aDatabase, CPbapLogWrapper* aLogWrapper);
 	void ConstructL();
+	void GetMatchDigitCountL();
 
 	TBool ContactExistsL(TContactItemId aContactId);
 	CParserVCard* CreateVCardParserLC(TVCardVersion aFormat);
--- a/pimprotocols/pbap/server/pbapvcardexporterutil.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/pimprotocols/pbap/server/pbapvcardexporterutil.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -69,22 +69,12 @@
 	CVersitTlsData::VersitTlsDataL();		
 	User::LeaveIfError(iTzClient.Connect());
 	
-	// Read the amount of digits to be used in contact matching
-	// The key is properly owned by PhoneApp, however we cannot include
-	// that header file from here, so a temporary fix has been done to 
-	// use locally defined versions.  If there is a problem here it is 
-	// likely because these values have gone out of sync.
-	CRepository* repository = CRepository::NewLC(KCRUidTelConfiguration);
-    if ( repository->Get(KTelMatchDigits, iMatchDigitCount) == KErrNone )
-        {
-        // Min is 7
-        iMatchDigitCount = Max(iMatchDigitCount, KDefaultGsmNumberMatchLength);
-        }
-    else
-        {
-        iMatchDigitCount = KDefaultGsmNumberMatchLength;
-        }
-	CleanupStack::PopAndDestroy(repository);
+	TRAPD(err, GetMatchDigitCountL())
+	if (err != KErrNone)
+		{
+		iMatchDigitCount = KDefaultGsmNumberMatchLength;
+		}
+
 	}
 
 CPbapVCardExporterUtil::~CPbapVCardExporterUtil()
@@ -93,7 +83,21 @@
 	iTzClient.Close();
 	CVersitTlsData::CloseVersitTlsData();
 	}
-	
+
+void CPbapVCardExporterUtil::GetMatchDigitCountL()
+	{
+	// Read the amount of digits to be used in contact matching
+	// The key is properly owned by PhoneApp, however we cannot include
+	// that header file from here, so a temporary fix has been done to 
+	// use locally defined versions.  If there is a problem here it is 
+	// likely because these values have gone out of sync.
+	CRepository* repository = CRepository::NewLC(KCRUidTelConfiguration);
+	User::LeaveIfError(repository->Get(KTelMatchDigits, iMatchDigitCount));
+	// The rest of the system has a miniumum of 7 for the number matching, so we do the same here
+	iMatchDigitCount = Max(iMatchDigitCount, KDefaultGsmNumberMatchLength);
+	CleanupStack::PopAndDestroy(repository);
+	}
+
 /**
  Export a contact as vCard.
 
--- a/predictivesearch/PcsAlgorithm/Algorithm2/inc/CPcsAlgorithm2MultiSearchHelper.h	Tue Sep 14 20:54:53 2010 +0300
+++ b/predictivesearch/PcsAlgorithm/Algorithm2/inc/CPcsAlgorithm2MultiSearchHelper.h	Wed Sep 15 11:56:55 2010 +0300
@@ -90,6 +90,18 @@
                               const TDesC& aData, 
                               RPointerArray<TDesC>& aMatchSet, 
                               RArray<TPsMatchLocation>& aMatchLocation);
+    
+
+	/**
+	 * Funtion to Search match string for multi query
+	 * 
+	 * @param aSearchQuery Search query
+	 * @param aData Source date for matching
+	 * @param aMatchedData Matching result 
+	 */
+	void LookupMatchL( CPsQuery& aSearchQuery,
+	        const TDesC& aData,
+	        TDes& aMatchedData );
 
 private:
 
--- a/predictivesearch/PcsAlgorithm/Algorithm2/src/CPcsAlgorithm2.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/predictivesearch/PcsAlgorithm/Algorithm2/src/CPcsAlgorithm2.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -202,9 +202,9 @@
 // ----------------------------------------------------------------------------
 TBool CPcsAlgorithm2::ReplaceZeroWithSpaceL(CPsQuery& aQuery)
     {
-    PRINT ( _L("Enter CPcsAlgorithm1::ReplaceZeroWithSpaceL") );
+    PRINT ( _L("Enter CPcsAlgorithm2::ReplaceZeroWithSpaceL") );
 
-       //PRINTQUERY ( _L("CPcsAlgorithm1::ReplaceZeroWithSpaceL (BEFORE): "), aQuery );
+       //PRINTQUERY ( _L("CPcsAlgorithm2::ReplaceZeroWithSpaceL (BEFORE): "), aQuery );
 
        TBool queryModified = EFalse;    
 
@@ -238,11 +238,11 @@
            }
        }
        
-       //PRINTQUERY ( _L("CPcsAlgorithm1::ReplaceZeroWithSpaceL (AFTER): "), aQuery );
+       //PRINTQUERY ( _L("CPcsAlgorithm2::ReplaceZeroWithSpaceL (AFTER): "), aQuery );
 
-       PRINT1 ( _L("CPcsAlgorithm1::ReplaceZeroWithSpaceL: Query modified (0=not, 1=yes): %d"), queryModified );
+       PRINT1 ( _L("CPcsAlgorithm2::ReplaceZeroWithSpaceL: Query modified (0=not, 1=yes): %d"), queryModified );
 
-       PRINT ( _L("End CPcsAlgorithm1::ReplaceZeroWithSpaceL") );
+       PRINT ( _L("End CPcsAlgorithm2::ReplaceZeroWithSpaceL") );
 
        return  queryModified;
     }
@@ -267,7 +267,7 @@
          
     if ( searchUris.Count() <= 0)
     {
-        PRINT ( _L("searchUris.Count() <= 0, Leave from CPcsAlgorithm1::PerformSearchL") );
+        PRINT ( _L("searchUris.Count() <= 0, Leave from CPcsAlgorithm2::PerformSearchL") );
         User::Leave(KErrArgument); 
     }
     CleanupStack::PopAndDestroy( &searchUris ); // ResetAndDestroy
@@ -489,17 +489,40 @@
 // CPcsAlgorithm2::SearchMatchStringL
 // Search function for input string, result also as string
 // ----------------------------------------------------------------------------
-void CPcsAlgorithm2::SearchMatchStringL( CPsQuery& /*aSearchQuery*/,
-                                         TDesC& /*aSearchData*/,
-                                         TDes& /*aMatch*/ )
+void CPcsAlgorithm2::SearchMatchStringL( CPsQuery& aSearchQuery,
+                                         TDesC& aSearchData,
+                                         TDes& aMatch )
     {
     PRINT ( _L("Enter CPcsAlgorithm2::SearchMatchStringL") );
 
-    //__LATENCY_MARK ( _L("CPcsAlgorithm2::SearchMatchStringL") ); 
+    __LATENCY_MARK ( _L("CPcsAlgorithm2::SearchMatchStringL") ); 
+    
+    RemoveSpacesL(aSearchQuery);
+    // ---------------------- Perform the initial search ----------------------
+    iMultiSearchHelper->LookupMatchL( aSearchQuery, aSearchData, aMatch );
+    PRINTQUERY ( _L("CPcsAlgorithm2::SearchMatchStringL: 1st search: "), aSearchQuery );
+    PRINT1     ( _L("CPcsAlgorithm2::SearchMatchStringL: 1st search: Search Data: %S"), &aSearchData );
+    PRINT1     ( _L("CPcsAlgorithm2::SearchMatchStringL: 1st search: Result: %S"), &aMatch );
+    // ------------------------------------------------------------------------
     
-    // TODO: Implementation missing
-    
-    //__LATENCY_MARKEND ( _L("CPcsAlgorithm2::SearchMatchStringL") );
+    // ---- Perform new search after "0" replacement if query is not empty ----
+    /* Examples:
+     * - If the original search string is "Abc0" then we will search again with "Abc".
+     * - If the original search string is "00" then we will not search again.
+     */
+    if ( aMatch.Length() <= 0 )
+    {
+        TBool isQueryModified = ReplaceZeroWithSpaceL(aSearchQuery);
+        RemoveSpacesL(aSearchQuery);
+        if ( isQueryModified && (aSearchQuery.Count() > 0) )
+        {
+            iMultiSearchHelper->LookupMatchL( aSearchQuery, aSearchData, aMatch );
+            PRINTQUERY ( _L("CPcsAlgorithm2::SearchMatchStringL: 2nd search: "), aSearchQuery );
+            PRINT1     ( _L("CPcsAlgorithm2::SearchMatchStringL: 2nd search: Search Data: %S"), &aSearchData );
+            PRINT1     ( _L("CPcsAlgorithm2::SearchMatchStringL: 2nd search: Result: %S"), &aMatch );            
+        }
+    }
+    __LATENCY_MARKEND ( _L("CPcsAlgorithm2::SearchMatchStringL") );
 
     PRINT ( _L("End CPcsAlgorithm2::SearchMatchStringL") );
     }
@@ -1321,7 +1344,7 @@
     TRAP(err, cache->ResortdataInPoolsL());
     if (err != KErrNone)
         {
-        PRINT ( _L("CPcsAlgorithm1::ChangeSortOrderL() Set Caching Error ") );
+        PRINT ( _L("CPcsAlgorithm2::ChangeSortOrderL() Set Caching Error ") );
         SetCachingError(aURI, err);
         UpdateCachingStatus(aURI, ECachingCompleteWithErrors);
         return;
--- a/predictivesearch/PcsAlgorithm/Algorithm2/src/CPcsAlgorithm2MultiSearchHelper.cpp	Tue Sep 14 20:54:53 2010 +0300
+++ b/predictivesearch/PcsAlgorithm/Algorithm2/src/CPcsAlgorithm2MultiSearchHelper.cpp	Wed Sep 15 11:56:55 2010 +0300
@@ -268,6 +268,137 @@
     }
 
 // ----------------------------------------------------------------------------
+// CPcsAlgorithm2MultiSearchHelper::LookupMatchL
+// ----------------------------------------------------------------------------
+void CPcsAlgorithm2MultiSearchHelper::LookupMatchL( CPsQuery& aSearchQuery,
+    const TDesC& aData, TDes& aMatchedData )
+    {
+    _LIT( KSpace, " " );
+    aMatchedData.Zero();
+    RPointerArray<CPsQuery> queryList = MultiQueryL( aSearchQuery );
+    CleanupResetAndDestroyPushL( queryList );
+    // Convert the individual queries to string form
+    RPointerArray<CPsQuery> mySearchQuery;
+    CleanupResetAndDestroyPushL( mySearchQuery );
+
+    // Remember a temporary copy of query list
+    // Copy the content of searchQuery
+    const TInt searchQueryCount = queryList.Count();
+    for (TInt i = 0; i < searchQueryCount; i++ )
+        {
+        CPsQuery* tempQuery = CPsQuery::NewL();
+        CleanupStack::PushL( tempQuery );
+        iAlgorithm->FindUtilECE()->GetPartOfQueryL( *(queryList[i]), 0,
+            queryList[i]->Count() - 1, *tempQuery );
+        mySearchQuery.AppendL( tempQuery );
+        CleanupStack::Pop( tempQuery ); // ownership transferred
+        }
+
+    // Sort the query items according to the length of each query 
+    TLinearOrder<CPsQuery> rule( CPcsAlgorithm2Utils::CompareLength );
+    mySearchQuery.Sort( rule );
+
+    // To hold the match results
+    RPointerArray<TDesC> tmpMatchSet;
+    CleanupResetAndDestroyPushL( tmpMatchSet );
+
+    TBool isMatch = ETrue;
+    TInt wordMatches = 0;
+
+    // Reset iWordMatches to zero 
+    ClearWordMatches();
+
+    // Check for each query atleast one data element matches
+    // Loop from the last query so that longest match is seen first
+    for (TInt queryIndex = mySearchQuery.Count() - 1; queryIndex >= 0; queryIndex-- )
+        {
+        TBool queryMatch = EFalse;
+        CPsQuery* tmpPsQuery = mySearchQuery[queryIndex];
+
+        TInt wordIndex = -1;
+        TLex lex( aData );
+
+        // First word
+        TPtrC tmpData = lex.NextToken();
+
+        // Search thru multiple words
+        while (tmpData.Length() != 0 )
+            {
+            wordIndex++;
+
+            // Compare the data against query
+            TBool matched = iAlgorithm->FindUtilECE()->MatchRefineL( tmpData,
+                *tmpPsQuery );
+
+            if ( matched )
+                {
+                // Perform two checks.
+                // 1. Ensure that the word is not matched against any previous query
+                // 2. If it is the first match to the query
+                TBool isWordMatch = IsWordMatch( 0, wordIndex );
+
+                // Check if the current word is not matched to any query
+                // For example, there is a contact named "abc a" and query is key2
+                // The key2 could match the first and second 'a'. So it is required to 
+                // check if the current word has aready been matched before.
+
+                if ( !isWordMatch )
+                    {
+                    // Check if no word is matched for this query till now
+                    if ( !queryMatch )
+                        {
+                        wordMatches++;
+                        queryMatch = ETrue;
+                        SetWordMap( 0, wordIndex );
+                        // Extract matched character sequence and fill in temp array
+                        TInt len = tmpPsQuery->Count();
+                        if ( iAlgorithm->FindUtilECE()->IsChineseWordIncluded(
+                            tmpData ) )
+                            {
+                            // A Chinese word could be matched by serveral keys
+                            // It is hard to know the matched query length. So set it to 1
+                            // as a trick result
+                            len = 1;
+                            }
+
+                        TPtrC seq = tmpData.Left( len );
+                        CPcsAlgorithm2Utils::AppendMatchToSeqL( tmpMatchSet,
+                            seq );
+                        }
+                    }
+                }
+
+            // Next word
+            tmpData.Set( lex.NextToken() );
+            }
+
+        // No data element matches the query. Ignore this result.
+        if ( queryMatch == EFalse )
+            {
+            isMatch = EFalse;
+            break;
+            }
+        }
+
+    // If match add the element to the result set
+    //  And before adding to the result set, check if there is atleast one match per query
+    if ( isMatch && wordMatches >= mySearchQuery.Count() )
+        {
+        const TInt matchCount = tmpMatchSet.Count();
+        for (TInt i = 0; i < matchCount; i++ )
+            {
+            aMatchedData.Append( *tmpMatchSet[i] );
+            aMatchedData.Append( KSpace );
+            }
+        aMatchedData.TrimRight();
+        }
+
+    CleanupStack::PopAndDestroy( &tmpMatchSet ); // ResetAndDestroy
+    CleanupStack::PopAndDestroy( &mySearchQuery ); // ResetAndDestroy
+    CleanupStack::PopAndDestroy( &queryList ); // ResetAndDestroy
+    }
+
+// ----------------------------------------------------------------------------
 // CPcsAlgorithm2MultiSearchHelper::FilterResultsMultiL
 // Subset search function. Refer the above function for more description.
 // ----------------------------------------------------------------------------