Revision: 201019
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 27 May 2010 13:07:04 +0300
changeset 26 62ef28f7b435
parent 22 75713bee6484
child 30 56e9a0aaad89
Revision: 201019 Kit: 2010121
classicui_plat/directory_localizer_api/directory_localizer_api.metaxml
classicui_plat/directory_localizer_api/group/bld.inf
classicui_plat/directory_localizer_api/inc/CDirectoryLocalizer.h
classicui_plat/directory_localizer_api/inc/DirectoryLocalizer.rh
classicui_plat/findutil_api/findutil_api.metaxml
classicui_plat/findutil_api/group/bld.inf
classicui_plat/findutil_api/inc/FindUtil.h
classicui_plat/findutil_api/tsrc/conf/tctestdomfindutil.cfg
classicui_plat/findutil_api/tsrc/conf/ui_testdomfindutil.cfg
classicui_plat/findutil_api/tsrc/group/bld.inf
classicui_plat/findutil_api/tsrc/group/testdomfindutil.mmp
classicui_plat/findutil_api/tsrc/group/testdomfindutil.pkg
classicui_plat/findutil_api/tsrc/inc/testdomfindutil.h
classicui_plat/findutil_api/tsrc/init/testdomfindutil.ini
classicui_plat/findutil_api/tsrc/src/testdomfindutil.cpp
classicui_plat/findutil_api/tsrc/src/testdomfindutilblocks.cpp
classicui_plat/group/bld.inf
uifw/AknGlobalUI/AknCapServer/inc/AknCapServerEntry.h
uifw/AknGlobalUI/AknCapServer/src/AknCapServerEntry.cpp
uifw/AknGlobalUI/AknCapServer/src/aknphonekeyforwarder.cpp
uifw/AvKon/akncompamode/rom/akncompamode.iby
uifw/AvKon/animdllsrc/AknAnimKeySound.cpp
uifw/AvKon/src/AknCharMap.cpp
uifw/AvKon/src/AknDef.cpp
uifw/EikStd/srvuisrc/EIKSRVUI.CPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/directory_localizer_api/directory_localizer_api.metaxml	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,18 @@
+<?xml version="1.0" ?>
+<api id="5460bfbef62504f671eece880cbb2d78" dataversion="1.0">
+  <name>Directory Localizer API</name>
+  <description>An interface for localizing directory names.</description>
+  <type>c++</type>
+  <subsystem>uiutils</subsystem>
+  <libs>
+    <lib name="DirectoryLocalizer.lib" />
+  </libs>
+  <release category="sdk" sinceversion="3.2"/>
+  <attributes>
+     <!-- This indicates wether the api provedes separate html documentation -->
+     <!-- or is the additional documentation generated from headers. -->
+     <!-- If you are unsuere then the value is "no" -->
+     <htmldocprovided>yes</htmldocprovided>
+     <adaptation>no</adaptation>
+  </attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/directory_localizer_api/group/bld.inf	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  File that exports the files belonging to 
+:                Directory Localizer API
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/DirectoryLocalizer.rh     MW_LAYER_PUBLIC_EXPORT_PATH(DirectoryLocalizer.rh)
+../inc/CDirectoryLocalizer.h     MW_LAYER_PUBLIC_EXPORT_PATH(CDirectoryLocalizer.h)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/directory_localizer_api/inc/CDirectoryLocalizer.h	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,201 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Directory Localizer interface class
+*
+*/
+
+
+
+#ifndef C_CDIRECTORYLOCALIZER_H
+#define C_CDIRECTORYLOCALIZER_H
+
+#include <e32def.h>
+
+class TResourceReader;
+
+
+/**
+ *  Directory Localizer interface class.
+ *
+ *  @lib directorylocalizer.lib
+ *  @since S60 v3.2
+ */
+NONSHARABLE_CLASS(CDirectoryLocalizer) : public CBase
+    {
+public: // Constructors and destructor    
+
+    /**
+     * Two-phased constructor.
+     * Construct a CDirectoryLocalizer and initialize it with platform specific 
+     * default localization data.
+     * 
+     * @return apointer to the created instance of CDirectoryLocalizer.
+     */
+    IMPORT_C static CDirectoryLocalizer* NewL();
+
+    /**
+     * Two-phased constructor.
+     * Construct a CDirectoryLocalizer and initialize it from resource pointed 
+     * by aReader.
+     * 
+     * @param aReader Reference to an initialized resource reader instance.
+     * @return apointer to the created instance of CDirectoryLocalizer.
+     */
+    IMPORT_C static CDirectoryLocalizer* NewL( TResourceReader& aReader );
+
+    /**
+     * Two-phased constructor.
+     * Construct a CDirectoryLocalizer and initialize it from a resource ID.
+     * 
+     * @param aResourceId Resource identifier to DIRECTORYLOCALIZER resource.
+     * @return apointer to the created instance of CDirectoryLocalizer.
+     */
+    IMPORT_C static CDirectoryLocalizer* NewL( TInt aResourceId );
+
+    /**
+     * Destructor.
+     */
+    IMPORT_C virtual ~CDirectoryLocalizer();
+
+public: // New methods
+	
+    /**
+     * Adds entries to the localizer from resource pointed by aReader.
+     *
+     * @param aReader Reference to an initialized resouce reader instance.
+     * @return None.
+     */
+    IMPORT_C void AddFromResourceL( TResourceReader& aReader );
+
+    /**
+     * Adds entries to the localizer from resource pointed by aResourceId.
+     *
+     * @param aResourceId Resource identifier to DIRECTORYLOCALIZER resource.
+     * @return None.
+     */
+    IMPORT_C void AddFromResourceL( TInt aResourceId );
+
+    /**
+     * This method is used to set the absolute path to be localized.
+     * For example "c:\\nokia\\images\\pictures". Take care that the path
+     * is given with or without the trailing backslash depending on
+     * how the paths are defined in the resource. localizer can utilize 
+     * pathinfo to retrieve predefined folder paths.
+     *
+     * @param aFullPath Full path name.
+     * @return None. 
+     *
+     * @code
+     *  #include <PathInfo.h>
+     *
+     *  // Get the the full path of the contacts folder in the memory card.
+     *  TFileName path = PathInfo::GetPath( PathInfo::EImagesPath );
+     *
+     *  // 'path' contains now the images path to be appended to a root path.
+     *
+     * CDirectoryLocalizer loc = CDirectoryLocalizer::NewL();
+     * loc->SetFullPath ( path );
+     * @endcode     
+     *
+     * @see PathInfo
+     */
+    IMPORT_C void SetFullPath( const TDesC& aFullPath );
+
+    /**
+     * Tells if the last given path is recognized as a localized directory.
+     *
+     * @return ETrue if last given path is localized and EFalse if not.
+     */
+    IMPORT_C TBool IsLocalized() const;
+
+    /**
+     * Returns a reference to a TDesC that contains the last given path's
+     * localized name. If the path is not a localized directory, then
+     * a pointer to KNullDesc is returned.
+     *
+     * @return the last given path's localized name.
+     */
+    IMPORT_C const TDesC& LocalizedName() const;
+
+    /**
+     * Returns a reference to a TDesC that contains the last given path's
+     * extra data. If the path is not a localized directory or no extra
+     * data is defined, then a pointer to KNullDesc is returned.
+     *
+     * @return the last given path's extra data.
+     */
+    IMPORT_C const TDesC& ExtraData() const;
+
+    /**
+     * Returns the icon index of the last given path. If the path is not a
+     * localized directory KErrGeneral is returned.
+     *
+     * @return the icon index of the last given path.
+     *
+     * @code
+     * CDirectoryLocalizer loc = CDirectoryLocalizer::NewL();
+     * loc-> SetFullPath( aDir );
+     * if ( loc->Icon() != KErrGeneral )
+     *     {
+     *     //...
+     *     }
+     * @endcode       
+     */
+    IMPORT_C TInt Icon() const;
+
+protected:
+
+    /**
+     * C++ default constructor.
+     */
+    CDirectoryLocalizer();
+ 
+    /**
+     * Symbian 2nd phase constructor.
+     */
+    void ConstructL();
+
+private: // data
+
+    /**
+     * The index of the current entry.
+     */
+    TInt iCurrentEntry;
+
+    /**
+     * A pointer to the array for paths.
+     * Own.
+     */
+    CArrayPtrFlat<TDesC>* iPaths;
+
+    /**
+     * A pointer to the array for localised names.
+     * Own.
+     */
+    CArrayPtrFlat<TDesC>* iLocalizedNames;
+
+    /**
+     * A pointer to the array for extra data.
+     * Own.
+     */
+    CArrayPtrFlat<TDesC>* iExtraData;
+
+    /**
+     * The array for icon indices.
+     */
+    RArray<TInt> iIconIndices;
+    
+    };
+
+#endif // C_CDIRECTORYLOCALIZER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/directory_localizer_api/inc/DirectoryLocalizer.rh	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Resource header file
+*
+*/
+
+
+#ifndef DIRECTORYLOCALIZER_RH
+#define DIRECTORYLOCALIZER_RH
+
+// -----------------------------------------------------------------------------
+// DIRECTORY
+// A resource structure for a directory entry
+// -----------------------------------------------------------------------------
+//
+STRUCT DIRECTORY
+    {
+    LTEXT fullPath; // Full path of the directory including drive
+    LTEXT localizedName; // Localised name defined in LOC file
+    LTEXT extraData; // For example localised name for another layout
+    WORD iconIndex; // Index of an icon. 
+                    // See definition of CDirectoryLocalizer::Icon()
+    }
+
+// -----------------------------------------------------------------------------
+// DIRECTORYLOCALIZER
+// A resource structure for directory localizer.
+// Contains DIRECTORY structures.
+// -----------------------------------------------------------------------------
+//
+STRUCT DIRECTORYLOCALIZER
+    {
+    STRUCT directories[]; // An array of DIRECTORY structures.
+    }
+            
+#endif // DIRECTORYLOCALIZER_RH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/findutil_api/findutil_api.metaxml	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,18 @@
+<?xml version="1.0" ?>
+<api id="5311c0915be9c721affbd95d5308cf9a" dataversion="2.0">
+  <name>FindUtil API</name>
+  <description>Utility for search functionality in lists. Used e.g. in phonebook.</description>
+  <type>c++</type>
+  <collection>domain</collection>
+  <libs>
+    <lib name="findutil.lib" />
+  </libs>
+  <release category="platform"/>
+  <attributes>
+     <!-- This indicates wether the api provedes separate html documentation -->
+     <!-- or is the additional documentation generated from headers. -->
+     <!-- If you are unsuere then the value is "no" -->
+     <htmldocprovided>no</htmldocprovided>
+     <adaptation>no</adaptation>
+  </attributes>
+</api>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/findutil_api/group/bld.inf	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   File that exports the files belonging to 
+:                FindUtil API
+*
+*/
+
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+../inc/FindUtil.h     OS_LAYER_PLATFORM_EXPORT_PATH(FindUtil.h)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/findutil_api/inc/FindUtil.h	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+
+#ifndef __FINDUTIL_H__
+#define __FINDUTIL_H__
+
+#include <e32base.h>
+
+/**
+* Identify the match policy for FindUtil API
+*/
+enum TMatchPolicy
+{
+    EDefault,
+    ECustomConverter
+};
+
+/**
+* Interface for the conversion of find string
+*/
+class MFindStringConverter
+    {
+public:
+    virtual void Converter(const TDesC& aSourStr, TDes& aDestStr) = 0;
+    };
+    
+/**
+* FindUtil API
+*/
+class MFindUtil
+	{
+public:
+	virtual TBool Match(const TDesC& aContactsField, const TDesC& aWord) = 0;
+	virtual TBool MatchRefineL( const TDesC& aItemString, const TDesC &aSearchText) = 0;
+	virtual TBool IsWordValidForMatching(const TDesC& aWord) = 0;
+	virtual TBool MatchAdaptiveRefineL( const TDesC& aItemString, const TDesC &aSearchText, HBufC*& aNextChars ) = 0;	
+	virtual TBool MatchRefineL( const TDesC& aItemString, const TDesC& aSearchText, 
+                                TMatchPolicy aPolicy, MFindStringConverter* aConverter) = 0;
+	};
+
+/**
+* CFindUtil instance gives access to MFindUtil interface.
+*/
+NONSHARABLE_CLASS(CFindUtil) : public CBase
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Creates a new CFindUtil instance.
+        * In those language variants, where FindUtil is not used,
+        * this method returns NULL.
+        */
+        IMPORT_C static CFindUtil* NewL();
+        IMPORT_C ~CFindUtil();
+
+    public: // New functions
+        MFindUtil* Interface() {return iInterface;}
+
+    private: // Private constructors
+        CFindUtil();
+        void ConstructL();
+
+    private: // Data
+        MFindUtil* iInterface;
+        RLibrary iLib;
+    };
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/findutil_api/tsrc/conf/tctestdomfindutil.cfg	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,84 @@
+[Test]
+title TestMatchRefineL
+run testscripter c:\testframework\ui_testdomfindutil.cfg 1
+[Endtest] 
+
+
+[Test]
+title TestMatch1
+run testscripter c:\testframework\ui_testdomfindutil.cfg 2
+[Endtest] 
+
+
+[Test]
+title TestMatch2
+run testscripter c:\testframework\ui_testdomfindutil.cfg 3
+[Endtest] 
+
+
+[Test]
+title TestMatch3
+run testscripter c:\testframework\ui_testdomfindutil.cfg 4
+[Endtest] 
+
+
+[Test]
+title TestMatch4
+run testscripter c:\testframework\ui_testdomfindutil.cfg 5
+[Endtest] 
+
+
+[Test]
+title TestMatch5
+run testscripter c:\testframework\ui_testdomfindutil.cfg 6
+[Endtest] 
+
+
+[Test]
+title TestIsWordValidForMatching1
+run testscripter c:\testframework\ui_testdomfindutil.cfg 7
+[Endtest] 
+
+
+[Test]
+title TestIsWordValidForMatching2
+run testscripter c:\testframework\ui_testdomfindutil.cfg 8
+[Endtest] 
+
+
+[Test]
+title TestIsWordValidForMatching3
+run testscripter c:\testframework\ui_testdomfindutil.cfg 9
+[Endtest] 
+
+
+[Test]
+title TestMatchAdaptiveRefineL1
+run testscripter c:\testframework\ui_testdomfindutil.cfg 10
+[Endtest] 
+
+
+[Test]
+title TestMatchAdaptiveRefineL2
+run testscripter c:\testframework\ui_testdomfindutil.cfg 11
+[Endtest] 
+
+
+[Test]
+title TestMatchAdaptiveRefineL3
+run testscripter c:\testframework\ui_testdomfindutil.cfg 12
+[Endtest] 
+
+
+[Test]
+title TestMatchAdaptiveRefineL4
+run testscripter c:\testframework\ui_testdomfindutil.cfg 13
+[Endtest] 
+
+
+[Test]
+title TestNewL
+run testscripter c:\testframework\ui_testdomfindutil.cfg 14
+[Endtest] 
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/findutil_api/tsrc/conf/ui_testdomfindutil.cfg	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,113 @@
+[Test]
+title TestMatchRefineL
+create testdomfindutil test 
+test TestMatchRefineL vaibhav mahesh
+delete test
+[Endtest] 
+
+
+[Test]
+title TestMatch1
+create testdomfindutil test 
+test TestMatch vaibhav vaib
+delete test
+[Endtest] 
+
+
+[Test]
+title TestMatch2
+create testdomfindutil test 
+test TestMatch vaibhav vaibhav
+delete test
+[Endtest] 
+
+
+[Test]
+title TestMatch3
+create testdomfindutil test 
+test TestMatch vaibhav mahesh
+delete test
+[Endtest] 
+
+
+[Test]
+title TestMatch4
+create testdomfindutil test 
+test TestMatch vaibhav  
+delete test
+[Endtest] 
+
+
+[Test]
+title TestMatch5
+create testdomfindutil test 
+test TestMatch vaibhavchavagoundapatilhowareyoueverythingfineoranythingspetial hi  
+delete test
+[Endtest] 
+
+
+[Test]
+title TestIsWordValidForMatching1
+create testdomfindutil test 
+test TestIsWordValidForMatching vaibhav
+delete test
+[Endtest] 
+
+
+[Test]
+title TestIsWordValidForMatching2
+create testdomfindutil test 
+test TestIsWordValidForMatching 123
+delete test
+[Endtest] 
+
+
+[Test]
+title TestIsWordValidForMatching3
+create testdomfindutil test 
+test TestIsWordValidForMatching ~*&%
+delete test
+[Endtest] 
+
+
+[Test]
+title TestMatchAdaptiveRefineL1
+create testdomfindutil test 
+test TestMatchAdaptiveRefineL vaibhav vaibhav vaibhav
+delete test
+[Endtest] 
+
+
+
+[Test]
+title TestMatchAdaptiveRefineL2
+create testdomfindutil test 
+test TestMatchAdaptiveRefineL vaibhav vaibhav bhav
+delete test
+[Endtest] 
+
+
+[Test]
+title TestMatchAdaptiveRefineL3
+create testdomfindutil test 
+test TestMatchAdaptiveRefineL vaibhav mahesh raj
+delete test
+[Endtest] 
+
+
+[Test]
+title TestMatchAdaptiveRefineL4
+create testdomfindutil test 
+test TestMatchAdaptiveRefineL vaibhav vai
+delete test
+[Endtest] 
+
+
+[Test]
+title TestNewL
+create testdomfindutil test
+test TestNewL
+delete test
+[Endtest] 
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/findutil_api/tsrc/group/bld.inf	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   test findutil.h
+*
+*/
+
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_TESTEXPORTS
+
+
+PRJ_EXPORTS
+
+
+PRJ_TESTMMPFILES
+testdomfindutil.mmp
+
+PRJ_MMPFILES
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/findutil_api/tsrc/group/testdomfindutil.mmp	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    test findutil.h
+*
+*/
+
+
+
+
+#include <data_caging_paths.hrh> 
+#include <platform_paths.hrh>
+
+TARGET          testdomfindutil.dll
+TARGETTYPE      dll
+UID             0x1000008D 0x2001CB80
+
+CAPABILITY      ALL -TCB
+
+DEFFILE         testdomfindutil.def
+
+USERINCLUDE     ../inc 
+
+MW_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH      ../src
+
+SOURCE          testdomfindutil.cpp
+SOURCE          testdomfindutilblocks.cpp
+
+LIBRARY         euser.lib
+LIBRARY         stiftestinterface.lib
+LIBRARY         stiftestengine.lib
+LIBRARY         findutil.lib
+
+LANG            SC
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/findutil_api/tsrc/group/testdomfindutil.pkg	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,39 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of the License "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description:  
+;
+&EN
+
+; Header
+#{"testdomfindutil"}, (0x2001CB80), 1, 0, 0, TYPE=SA
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+
+;Copying ordinary file (not language dependent) to fixed drive drive.
+
+"..\init\testdomfindutil.ini"-"c:\Testframework\testdomfindutil.ini", FF   ; FF stands for Normal file
+"..\conf\tctestdomfindutil.cfg"-"c:\Testframework\tctestdomfindutil.cfg", FF   ; FF stands for Normal file
+"..\conf\ui_testdomfindutil.cfg"-"c:\Testframework\ui_testdomfindutil.cfg", FF   ; FF stands for Normal file
+
+"\epoc32\RELEASE\ARMV5\urel\testdomfindutil.dll"-"c:\sys\bin\testdomfindutil.dll", FF
+
+
+; Trim For Mms
+; ------------
+; to be added later
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/findutil_api/tsrc/inc/testdomfindutil.h	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,156 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    test findutil.h
+*
+*/
+
+
+
+
+
+#ifndef C_TESTDOMFINDUTIL_H
+#define C_TESTDOMFINDUTIL_H
+
+//  INCLUDES
+#include <stiflogger.h>
+#include <testscripterinternal.h>
+#include <stiftestmodule.h>
+#include <testclassassert.h>
+
+// MACROS
+#define TEST_CLASS_VERSION_MAJOR 0
+#define TEST_CLASS_VERSION_MINOR 0
+#define TEST_CLASS_VERSION_BUILD 0
+
+// Logging path
+_LIT( KtestdomfindutilLogPath, "\\logs\\testframework\\testdomfindutil\\" ); 
+// Log file
+_LIT( KtestdomfindutilLogFile, "testdomfindutil.txt" ); 
+_LIT( KtestdomfindutilLogFileWithTitle, "testdomfindutil_[%S].txt" );
+
+/**
+*  CTestDOMFindUtil test class for STIF Test Framework TestScripter.
+*  @since S60 5.0
+*/
+NONSHARABLE_CLASS( CTestDOMFindUtil ) : public CScriptBase
+    {
+public:  // Constructors and destructor
+
+    /**
+    * Two-phased constructor.
+    */
+    static CTestDOMFindUtil* NewL( CTestModuleIf& aTestModuleIf );
+
+    /**
+    * Destructor.
+    */
+    virtual ~CTestDOMFindUtil();
+
+public: // Functions from base classes
+
+    /**
+    * From CScriptBase Runs a script line.
+    * @since S60 5.0
+    * @param aItem Script line containing method name and parameters
+    * @return Symbian OS error code
+    */
+    virtual TInt RunMethodL( CStifItemParser& aItem );
+
+private:
+
+    /**
+    * C++ default constructor.
+    */
+    CTestDOMFindUtil( CTestModuleIf& aTestModuleIf );
+
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    */
+    void ConstructL();
+
+    /**
+     * Method used to log version of test class
+     */
+    void SendTestClassVersion();
+
+        /**
+     * Turn off ScreenSaver
+     * @since S60 5.0
+     * @return Symbian OS error code.
+     */
+    void TurnOffScreenSaver();
+
+    /**
+     * Restore ScreenSaver
+     * @since S60 5.0
+     * @return Symbian OS error code.
+     */
+    void RestoreScreenSaver();
+
+private: // test functions of MFindUtil class
+
+    /**
+    * test MatchRefineL method.
+    * @since S60 5.0
+    * @param aItem Script line containing parameters.
+    * @return Symbian OS error code.
+    */
+    virtual TInt TestMatchRefineL( CStifItemParser& aItem );
+
+    /**
+    * test Match method.
+    * @since S60 5.0
+    * @param aItem Script line containing parameters.
+    * @return Symbian OS error code.
+    */
+    virtual TInt TestMatchL( CStifItemParser& aItem );
+
+    /**
+    * test IsWordValidForMatching method.
+    * @since S60 5.0
+    * @param aItem Script line containing parameters.
+    * @return Symbian OS error code.
+    */
+    virtual TInt TestIsWordValidForMatchingL( CStifItemParser& aItem );
+
+    /**
+    * test MatchAdaptiveRefineL method.
+    * @since S60 5.0
+    * @param aItem Script line containing parameters.
+    * @return Symbian OS error code.
+    */
+    virtual TInt TestMatchAdaptiveRefineL( CStifItemParser& aItem );
+
+private: // test functions of CFindUtil class
+
+    /**
+    * test NewL method.
+    * @since S60 5.0
+    * @param aItem never used.
+    * @return Symbian OS error code.
+    */
+    virtual TInt TestNewL( CStifItemParser& aItem );
+
+private:    // Data
+
+    /**
+     * ScreenSaver Property
+     */
+    TInt iOldScreenSaverProperty;
+
+    };
+
+#endif      // C_TESTDOMFINDUTIL_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/findutil_api/tsrc/init/testdomfindutil.ini	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,181 @@
+#
+# This is STIFTestFramework initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+# - Set Test Reporting mode. TestReportMode's possible values are:
+#     + 'Summary': Summary of the tested test cases.
+#     + 'Environment': Hardware and software info.
+#     + 'TestCases': Test case report.
+#     + 'FullReport': Set of all above ones.
+#     + Example 'TestReportMode= Summary TestCases'
+#
+#     - CreateTestReport setting controls report creation mode
+#     + YES, Test report will created.
+#     + NO, No Test report.
+#
+#     - File path indicates the base path of the test report.
+#     - File name indicates the name of the test report.
+#
+#     - File format indicates the type of the test report.
+#     + TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#     + HTML, Test report will be html type, for example 'TestReport.html'.
+#
+#     - File output indicates output source of the test report.
+#     + FILE, Test report logging to file.
+#     + RDEBUG, Test report logging to using rdebug.
+#
+#     - File Creation Mode indicates test report overwriting if file exist.
+#     + OVERWRITE, Overwrites if the Test report file exist.
+#     + APPEND, Continue logging after the old Test report information if 
+#           report exist.
+
+[Engine_Defaults]
+
+TestReportMode= FullReport    # Possible values are: 
+                              # 'Summary', 'Environment', 'TestCases' or 'FullReport'
+
+CreateTestReport= YES         # Possible values: YES or NO
+
+TestReportFilePath= C:\LOGS\TestFramework\
+TestReportFileName= TestReport
+
+TestReportFormat= TXT         # Possible values: TXT or HTML
+TestReportOutput= FILE        # Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE    # Possible values: OVERWRITE or APPEND
+UITestingSupport= Yes
+SeparateProcesses= YES
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= testdomfindutiltestdomfindutiltestdomfindutil
+# Modules might have initialisation file, specified as
+# IniFile= YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= NormalCases.txt
+# TestCaseFile= SmokeCases.txt
+# TestCaseFile= ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+[New_Module]
+ModuleName= testcombiner
+TestCaseFile= c:\testframework\tctestdomfindutil.cfg
+[End_Module]
+
+#[New_Module]
+#ModuleName= testscripter
+#TestCaseFile= c:\testframework\ui_testdomfindutil.cfg
+#[End_Module]
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+#Load testmoduletestdomfindutil, optionally with initialization file and/or test case files
+#[New_Module]
+#ModuleName= testmodulexxx
+
+#TestModuletestdomfindutil used initialization file
+#IniFile= init.txt
+
+#TestModuletestdomfindutil used configuration file(s)
+#TestCaseFile= testcases1.cfg
+#TestCaseFile= testcases2.cfg
+#TestCaseFile= manualtestcases.cfg
+
+#[End_Module]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIFTestFramework logging overwrite parameters for Logger.
+# Hardware and emulator environment logging path and styles can
+# be configured from here to overwrite the Logger's implemented values.
+#	
+# Settings description:
+# - Indicates option for creation log directory/directories. If log directory/directories
+#       is/are not created by user they will make by software.
+#     + YES, Create log directory/directories if not allready exist.
+#     + NO, Log directory/directories not created. Only created one is used.
+#
+# - Overwrite emulator path setting.
+#     + Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#       Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#       will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+# - Overwrite emulator's logging format.
+#     + TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#     + HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+# - Overwrited emulator logging output source.
+#     + FILE, Logging to file(s).
+#     + RDEBUG, Logging to using rdebug(s).
+#
+# - Overwrite hardware path setting (Same description as above in emulator path).
+# - Overwrite hardware's logging format(Same description as above in emulator format).
+# - Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+# - File Creation Mode indicates file overwriting if file exist.
+#     + OVERWRITE, Overwrites if file(s) exist.
+#     + APPEND, Continue logging after the old logging information if file(s) exist.
+#
+# - Will thread id include to the log filename.
+#     + YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#     + NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+# - Will time stamps include the to log file.
+#     + YES, Time stamp added to each line in log file(s). Time stamp is 
+#       for example'12.Nov.2003 115958 LOGGING INFO'
+#     + NO, No time stamp(s).
+#
+# - Will line breaks include to the log file.
+#     + YES, Each logging event includes line break and next log event is in own line.
+#     + NO, No line break(s).
+#
+# - Will event ranking include to the log file.
+#     + YES, Event ranking number added to each line in log file(s). Ranking number 
+#       depends on environment's tics, for example(includes time stamp also)
+#       '012   12.Nov.2003 115958    LOGGING INFO'
+#     + NO, No event ranking.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#' 
+
+CreateLogDirectories= YES    # Possible values: YES or NO
+
+EmulatorBasePath= C:\LOGS\TestFramework\
+EmulatorFormat= HTML         # Possible values: TXT or HTML
+EmulatorOutput= FILE         # Possible values: FILE or RDEBUG
+
+#HardwareBasePath= D:\LOGS\TestFramework\
+#HardwareFormat= HTML        # Possible values: TXT or HTML
+#HardwareOutput= FILE        # Possible values: FILE or RDEBUG
+
+FileCreationMode= OVERWRITE  # Possible values: OVERWRITE or APPEND
+
+#ThreadIdToLogFile= YES      # Possible values: YES or NO
+#WithTimeStamp= YES          # Possible values: YES or NO
+#WithLineBreak= YES          # Possible values: YES or NO
+#WithEventRanking= YES       # Possible values: YES or NO
+
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/findutil_api/tsrc/src/testdomfindutil.cpp	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,186 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    test findutil.h
+*
+*/
+
+
+
+
+
+// INCLUDE FILES
+#include <stiftestinterface.h>
+#include <settingserverclient.h>
+#include <screensaverinternalpskeys.h>
+#include <e32property.h>
+
+#include "testdomfindutil.h"
+
+// CONSTANTS
+_LIT( KModuleName, "testdomfindutil.dll" );
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CTestDOMFindUtil::CTestDOMFindUtil
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CTestDOMFindUtil::CTestDOMFindUtil( CTestModuleIf& aTestModuleIf ):
+    CScriptBase( aTestModuleIf )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CTestDOMFindUtil::~CTestDOMFindUtil
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CTestDOMFindUtil::~CTestDOMFindUtil()
+    {
+    // Delete logger
+    delete iLog; 
+
+    }
+
+// -----------------------------------------------------------------------------
+// CTestDOMFindUtil::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CTestDOMFindUtil::ConstructL()
+    {
+    //Read logger settings to check whether test case name is to be
+    //appended to log file name.
+    RSettingServer settingServer;
+    CleanupClosePushL( settingServer );
+    TInt ret = settingServer.Connect();
+    if ( ret != KErrNone )
+        {
+        User::Leave(ret);
+        }
+    // Struct to StifLogger settigs.
+    TLoggerSettings loggerSettings; 
+    // Parse StifLogger defaults from STIF initialization file.
+    ret = settingServer.GetLoggerSettings( loggerSettings );
+    if ( ret != KErrNone )
+        {
+        User::Leave( ret );
+        } 
+    // Close Setting server session
+    settingServer.Close();
+    CleanupStack::PopAndDestroy( &settingServer );
+
+    TFileName logFileName;
+    
+    if ( loggerSettings.iAddTestCaseTitle )
+        {
+        TName title;
+        TestModuleIf().GetTestCaseTitleL( title );
+        logFileName.Format( KtestdomfindutilLogFileWithTitle, &title );
+        }
+    else
+        {
+        logFileName.Copy( KtestdomfindutilLogFile );
+        }
+
+    iLog = CStifLogger::NewL( KtestdomfindutilLogPath, 
+                          logFileName,
+                          CStifLogger::ETxt,
+                          CStifLogger::EFile,
+                          EFalse );
+    
+    SendTestClassVersion();
+    
+    TurnOffScreenSaver();
+    }
+
+// -----------------------------------------------------------------------------
+// CTestDOMFindUtil::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CTestDOMFindUtil* CTestDOMFindUtil::NewL( CTestModuleIf& aTestModuleIf )
+    {
+    CTestDOMFindUtil* self = new( ELeave ) CTestDOMFindUtil( aTestModuleIf );
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    return self;
+
+    }
+
+//-----------------------------------------------------------------------------
+// CTestDOMFindUtil::SendTestClassVersion
+// Method used to send version of test class
+//-----------------------------------------------------------------------------
+//
+void CTestDOMFindUtil::SendTestClassVersion()
+    {
+    TVersion moduleVersion;
+    moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
+    moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
+    moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
+
+    TFileName moduleName;
+    moduleName = KModuleName;
+
+    TBool newVersionOfMethod = ETrue;
+    TestModuleIf().SendTestModuleVersion( moduleVersion, moduleName, 
+        newVersionOfMethod );
+    }
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// LibEntryL is a polymorphic Dll entry point.
+// Returns: CScriptBase: New CScriptBase derived object
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CScriptBase* LibEntryL( 
+    CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
+    {
+    return ( CScriptBase* ) CTestDOMFindUtil::NewL( aTestModuleIf );
+    }
+
+// -----------------------------------------------------------------------------
+// Turn off ScreenSaver
+// -----------------------------------------------------------------------------
+//
+void CTestDOMFindUtil::TurnOffScreenSaver()
+    {
+    TInt err1 = RProperty::Get( KPSUidScreenSaver, KScreenSaverAllowScreenSaver, 
+        iOldScreenSaverProperty );
+    TInt err2 = RProperty::Set( KPSUidScreenSaver, KScreenSaverAllowScreenSaver, 
+        KScreenSaverAllowScreenSaver );    
+    RDebug::Printf( "screensaver property=%d err1=%d err2=%d\n", 
+        iOldScreenSaverProperty, err1, err2 );
+    }
+
+// -----------------------------------------------------------------------------
+// Restore ScreenSaver
+// -----------------------------------------------------------------------------
+//
+void CTestDOMFindUtil::RestoreScreenSaver()
+    {
+    RProperty::Set( KPSUidScreenSaver, KScreenSaverAllowScreenSaver, 
+        iOldScreenSaverProperty );
+    User::ResetInactivityTime();
+    }
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/classicui_plat/findutil_api/tsrc/src/testdomfindutilblocks.cpp	Thu May 27 13:07:04 2010 +0300
@@ -0,0 +1,221 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    test findutil.h
+*
+*/
+
+
+
+
+
+// [INCLUDE FILES]
+#include <e32svr.h>
+#include <stifparser.h>
+#include <stiftestinterface.h>
+#include <findutil.h>
+
+#include "testdomfindutil.h"
+
+// CONSTANTS
+const TInt KMaxLength = 10;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CTestDOMFindUtil::RunMethodL
+// Run specified method. Contains also table of test mothods and their names.
+// -----------------------------------------------------------------------------
+//
+TInt CTestDOMFindUtil::RunMethodL( CStifItemParser& aItem ) 
+    {
+
+    static TStifFunctionInfo const KFunctions[] =
+        {  
+        // First string is the function name used in TestScripter script file.
+        // Second is the actual implementation member function. 
+        ENTRY( "TestMatchRefineL", CTestDOMFindUtil::TestMatchRefineL ),
+        ENTRY( "TestMatch", CTestDOMFindUtil::TestMatchL ),
+        ENTRY( "TestIsWordValidForMatching",
+                CTestDOMFindUtil::TestIsWordValidForMatchingL ),
+        ENTRY( "TestMatchAdaptiveRefineL",
+                CTestDOMFindUtil::TestMatchAdaptiveRefineL),
+
+        ENTRY( "TestNewL", CTestDOMFindUtil::TestNewL ),
+
+        // [test cases entries]
+
+        };
+
+    const TInt count = sizeof( KFunctions ) / sizeof( TStifFunctionInfo );
+
+    return RunInternalL( KFunctions, count, aItem );
+
+    }
+
+// -----------------------------------------------------------------------------
+// CTestDOMFindUtil::TestMatchRefineL
+// -----------------------------------------------------------------------------
+//
+TInt CTestDOMFindUtil::TestMatchRefineL( CStifItemParser& aItem )
+    {
+
+    // Print to UI
+    _LIT( KTestDOMFindUtil, "testdomfindutil" );
+    _LIT( KTestMatchRefineL, "In MatchRefineL" );
+    TestModuleIf().Printf( 0, KTestDOMFindUtil, KTestMatchRefineL );
+    // Print to log file
+    iLog->Log( KTestMatchRefineL );
+
+    CFindUtil* util = CFindUtil::NewL();
+    CleanupStack::PushL( util );
+    MFindUtil* findUtil = util->Interface();
+
+    TPtrC firstRow, stringToFind;
+    aItem.GetNextString( firstRow );
+    aItem.GetNextString( stringToFind );
+
+    TInt result = findUtil->MatchRefineL( firstRow, stringToFind );
+    STIF_ASSERT_EQUALS( 0, result );
+
+    CleanupStack::PopAndDestroy( util );
+    return KErrNone;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CTestDOMFindUtil::TestMatchL
+// -----------------------------------------------------------------------------
+//
+TInt CTestDOMFindUtil::TestMatchL( CStifItemParser& aItem )
+    {
+
+    // Print to UI
+    _LIT( KTestDOMFindUtil, "testdomfindutil" );
+    _LIT( KTestMatch, "In Match" );
+    TestModuleIf().Printf( 0, KTestDOMFindUtil, KTestMatch );
+    // Print to log file
+    iLog->Log( KTestMatch );
+
+    CFindUtil* util = CFindUtil::NewL();
+    CleanupStack::PushL( util );
+    MFindUtil* findUtil = util->Interface();
+
+    TPtrC firstWord, secondWord;
+    aItem.GetNextString( firstWord );
+    aItem.GetNextString( secondWord );
+
+    TBool result = findUtil->Match( firstWord, secondWord );
+
+    CleanupStack::PopAndDestroy( util );
+
+    return KErrNone;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CTestDOMFindUtil::TestIsWordValidForMatchingL
+// -----------------------------------------------------------------------------
+//
+TInt CTestDOMFindUtil::TestIsWordValidForMatchingL(
+        CStifItemParser& aItem )
+    {
+
+    // Print to UI
+    _LIT( KTestDOMFindUtil, "testdomfindutil" );
+    _LIT( KTestIsWordValidForMatching, "In IsWordValidForMatching" );
+    TestModuleIf().Printf( 0, KTestDOMFindUtil, KTestIsWordValidForMatching );
+    // Print to log file
+    iLog->Log( KTestIsWordValidForMatching );
+
+    CFindUtil* util = CFindUtil::NewL();
+    CleanupStack::PushL( util );
+    MFindUtil* findUtil = util->Interface();
+
+    TPtrC word;
+    aItem.GetNextString( word );
+
+    TBool result = findUtil->IsWordValidForMatching( word );
+    STIF_ASSERT_TRUE( result );
+
+    CleanupStack::PopAndDestroy( util );
+    return KErrNone;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CTestDOMFindUtil::TestMatchAdaptiveRefineL
+// -----------------------------------------------------------------------------
+//
+TInt CTestDOMFindUtil::TestMatchAdaptiveRefineL( CStifItemParser& aItem )
+    {
+
+    // Print to UI
+    _LIT( KTestDOMFindUtil, "testdomfindutil" );
+    _LIT( KTestMatchAdaptiveRefineL, "In MatchAdaptiveRefineL" );
+    TestModuleIf().Printf( 0, KTestDOMFindUtil, KTestMatchAdaptiveRefineL );
+    // Print to log file
+    iLog->Log( KTestMatchAdaptiveRefineL );
+
+    CFindUtil* util = CFindUtil::NewL();
+    CleanupStack::PushL( util );
+    MFindUtil* findUtil = util->Interface();
+
+    TPtrC firstWord, secondWord, temp;
+
+    HBufC* nextChar = HBufC::NewL( KMaxLength );
+    CleanupStack::PushL( nextChar );
+
+    aItem.GetNextString( firstWord );
+    aItem.GetNextString( secondWord );
+    aItem.GetNextString( temp );
+    nextChar->Des().Copy( temp );
+
+    TBool result = findUtil->MatchAdaptiveRefineL( firstWord, secondWord,
+            nextChar );
+    STIF_ASSERT_FALSE( result );
+
+    CleanupStack::PopAndDestroy( nextChar );
+    CleanupStack::PopAndDestroy( util );
+    return KErrNone;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CTestDOMFindUtil::TestNewL
+// -----------------------------------------------------------------------------
+//
+TInt CTestDOMFindUtil::TestNewL( CStifItemParser& /*aItem*/ )
+    {
+
+    // Print to UI
+    _LIT( KTestDOMFindUtil, "testdomfindutil" );
+    _LIT( KTestNewL, "In NewL" );
+    TestModuleIf().Printf( 0, KTestDOMFindUtil, KTestNewL );
+    // Print to log file
+    iLog->Log( KTestNewL );
+
+    CFindUtil* findUtil = CFindUtil::NewL();
+    CleanupStack::PushL( findUtil );
+    STIF_ASSERT_NOT_NULL( findUtil );
+
+    CleanupStack::Pop( findUtil );
+    delete findUtil;
+    findUtil = NULL;
+
+    return KErrNone;
+
+    }
+
+
+//  [End of File]
--- a/classicui_plat/group/bld.inf	Fri May 14 16:06:26 2010 +0300
+++ b/classicui_plat/group/bld.inf	Thu May 27 13:07:04 2010 +0300
@@ -100,3 +100,5 @@
 #include "../discreet_popup_api/group/bld.inf"
 #include "../touch_gesture_framework_api/group/bld.inf"
 #include "../extended_options_menu_api/group/bld.inf"
+#include "../findutil_api/group/bld.inf"
+#include "../directory_localizer_api/group/bld.inf"
--- a/uifw/AknGlobalUI/AknCapServer/inc/AknCapServerEntry.h	Fri May 14 16:06:26 2010 +0300
+++ b/uifw/AknGlobalUI/AknCapServer/inc/AknCapServerEntry.h	Thu May 27 13:07:04 2010 +0300
@@ -192,7 +192,6 @@
     void PublishHiddenList();
     void PublishInstalledLanguagesL();
     static TInt GlobalNotesAllowedCallBack(TAny* aPtr);
-    static TInt TelephonyIdleUidCallBack(TAny* aPtr);
     void HandlePropertyChange(const TInt aProperty);
     void ProcessInitFlipStatus();
     void InitiateOFNStatus();
@@ -264,8 +263,6 @@
     RProperty iGlobalNotesAllowedProperty;
     CPropertySubscriber* iGlobalNotesAllowedSubscriber;
     
-    RProperty iTelephonyIdleUidProperty;
-    CPropertySubscriber* iTelephonyIdleUidSubscriber;
     TBool iIdleActive;
     };
 
--- a/uifw/AknGlobalUI/AknCapServer/src/AknCapServerEntry.cpp	Fri May 14 16:06:26 2010 +0300
+++ b/uifw/AknGlobalUI/AknCapServer/src/AknCapServerEntry.cpp	Thu May 27 13:07:04 2010 +0300
@@ -32,7 +32,6 @@
 #endif
 #include "avkoninternalpskeys.h"     // KAknIdleAppWindowGroupId
 #include <AknCapServerDefs.h>
-#include <activeidle2domainpskeys.h>
 #include <eikpriv.rsg>
 #include <coedef.h>
 #include <eiksvdef.h>
@@ -84,7 +83,7 @@
 #include "akncapserverdiscreetpopuphandler.h"
 
 const TUid KPtiEnginePSUid = {0x101F8610}; // Same as PtiEngine dll
-
+const TUid KPhoneUid = { 0x100058B3 };
 enum TPtiEnginePSKeys
     {
     EKeyMapPropertyCount,
@@ -153,7 +152,6 @@
 CAknCapAppServerAppUi::~CAknCapAppServerAppUi()
     {
     delete iAlternateFS;
-    delete iTelephonyIdleUidSubscriber;
     delete iGlobalNotesAllowedSubscriber;
     
     if (iKeyCaptureControl)
@@ -442,16 +440,6 @@
 
     iGlobalNotesAllowedSubscriber->Subscribe();
     
-    // Start listening "telephony idle uid" property.
-    User::LeaveIfError(iTelephonyIdleUidProperty.Attach(
-        KPSUidAiInformation, 
-        KActiveIdleUid));
-
-    iTelephonyIdleUidSubscriber = new (ELeave) CPropertySubscriber(
-        TCallBack(TelephonyIdleUidCallBack, this), 
-        iTelephonyIdleUidProperty);
-
-    iTelephonyIdleUidSubscriber->Subscribe();    
 #ifdef RD_INTELLIGENT_TEXT_INPUT
          
     TInt err1 = 0;         
@@ -1359,15 +1347,6 @@
     return KErrNone;
     }
 
-TInt CAknCapAppServerAppUi::TelephonyIdleUidCallBack(TAny* aPtr)
-    {
-    CAknCapAppServerAppUi* self = static_cast<CAknCapAppServerAppUi*>(aPtr);
-    if (self)
-        {
-        self->HandlePropertyChange(KActiveIdleUid);
-        }
-    return KErrNone;
-    }
     
 void CAknCapAppServerAppUi::HandlePropertyChange(const TInt aProperty)
     {
@@ -1375,29 +1354,15 @@
         {
         case KUikGlobalNotesAllowed:
             {
-            TInt globalNotesAllowed = 0;
-            TInt err = iTelephonyIdleUidProperty.Get(globalNotesAllowed);
-            if(!err && globalNotesAllowed)
+            TUid uid = KPhoneUid;
+            TApaTaskList taskList ( CEikonEnv::Static ()->WsSession () );
+            TApaTask task = taskList.FindApp ( uid );
+            if ( task.Exists() )
                 {
-                // Global notes allowed, so the boot is finished. Now the idle app uid and its
-                // window group id can be fetched.
-                HandlePropertyChange(KActiveIdleUid);
-                }
-            }
-            break;
-        case KActiveIdleUid:
-            {
-            TInt idleAppUid = 0;
-            TInt err = iTelephonyIdleUidProperty.Get(idleAppUid);
-            if(!err)
-                {
-                // Fetch the Idle application window group id.
-                TApaTaskList taskList(CEikonEnv::Static()->WsSession());
-                TApaTask task = taskList.FindApp(TUid::Uid(idleAppUid));
-                TInt wgId = task.WgId();
-                
+                TInt wgId = task.WgId ();
                 // Save the window group id to PubSub. 
-                RProperty::Set(KPSUidAvkonInternal, KAknIdleAppWindowGroupId, wgId);     
+                RProperty::Set ( KPSUidAvkonInternal, KAknIdleAppWindowGroupId,
+                        wgId );
                 }
             }
             break;
--- a/uifw/AknGlobalUI/AknCapServer/src/aknphonekeyforwarder.cpp	Fri May 14 16:06:26 2010 +0300
+++ b/uifw/AknGlobalUI/AknCapServer/src/aknphonekeyforwarder.cpp	Thu May 27 13:07:04 2010 +0300
@@ -18,17 +18,11 @@
 #include <e32property.h>
 #include <e32std.h> // needed because activeidle2domainpskeys.h doesn't include this
 #include "AknCapServerEntry.h"
-#include <activeidle2domainpskeys.h> // yet another nasty dep
 
 #define KPhoneAppUid TUid::Uid(0x100058B3)
 
 TBool AknPhoneKeyForwarder::ForwardKeyToPhoneApp(TAny* aKeyEvent)
     {
-    RProperty::Set(
-        KPSUidAiInformation, 
-        KActiveIdleState,
-        EPSAiNumberEntry );
-
     RWsSession& ws = CCoeEnv::Static()->WsSession();
     TApaTaskList list(ws);
     TApaTask phone = list.FindApp(KPhoneAppUid);
--- a/uifw/AvKon/akncompamode/rom/akncompamode.iby	Fri May 14 16:06:26 2010 +0300
+++ b/uifw/AvKon/akncompamode/rom/akncompamode.iby	Thu May 27 13:07:04 2010 +0300
@@ -30,7 +30,7 @@
 S60_APP_EXE(akncompasrv)
 
 // General settings plugin (ECOM)
-ECOM_PLUGIN(akncompags.dll, akncompags.rsc)
-data=DATAZ_\RESOURCE_FILES_DIR\akncompagsrsc.rsc RESOURCE_FILES_DIR\akncompagsrsc.rsc
+//ECOM_PLUGIN(akncompags.dll, akncompags.rsc)
+//data=DATAZ_\RESOURCE_FILES_DIR\akncompagsrsc.rsc RESOURCE_FILES_DIR\akncompagsrsc.rsc
 
 #endif // AKNCOMPAMODE_IBY
--- a/uifw/AvKon/animdllsrc/AknAnimKeySound.cpp	Fri May 14 16:06:26 2010 +0300
+++ b/uifw/AvKon/animdllsrc/AknAnimKeySound.cpp	Thu May 27 13:07:04 2010 +0300
@@ -32,7 +32,7 @@
 
 // This is currently nasty set dependencies, API should be moved to middleware layer asap 
 #include <ctsydomainpskeys.h> 
-#include <activeidle2domainpskeys.h>
+
 #include <networkhandlingdomainpskeys.h>
 #include <PSVariables.h>
 
@@ -525,7 +525,6 @@
 
         // If system is not in idle or there are calls ongoing, then end key ought to be generated.
         User::LeaveIfError( RProperty::Get( KPSUidCtsyCallInformation, KCTsyCallState, ps ) );
-        User::LeaveIfError( RProperty::Get( KPSUidAiInformation, KActiveIdleState, idle ) );
         User::LeaveIfError( RProperty::Get( KPSUidUikon, KUikGlobalNotesAllowed, startupOk ) );
 
         RDebug::Print(_L("call: %d, idle %d, notes %d"), ps, idle, startupOk);
@@ -536,23 +535,11 @@
             {
             return;
             }
-        
-        if ( idle == EPSAiForeground )
-            { 
-            // Notify active idle plugins that combined end key / power key has been pressed.
-            RProperty::Set(KPSUidAvkonDomain, KAknEndKeyEvent, 1); 
-            }
-        
         if ( ps != EPSCTsyCallStateNone )
             {
             // A phone call is active.
             aResult = EEmulateNowPhoneCallActive;
             }
-        else if ( idle != EPSAiForeground )
-            {
-            // We are not in idle view. No active phone calls.
-            aResult = EEmulateNow;
-            }
         else
             {
             // We are in idle view with no active phone calls. 
--- a/uifw/AvKon/src/AknCharMap.cpp	Fri May 14 16:06:26 2010 +0300
+++ b/uifw/AvKon/src/AknCharMap.cpp	Thu May 27 13:07:04 2010 +0300
@@ -42,7 +42,7 @@
 #include <AknPanic.h>
 #include "aknSctDialog.h" // CAknCharmapDialog
 #include <aknPopupHeadingPane.h>
-#include <aknfep.rsg>
+//#include <aknfep.rsg>
 #include <bautils.h>
 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
 #include <uikon/eikenvinterface.h>
--- a/uifw/AvKon/src/AknDef.cpp	Fri May 14 16:06:26 2010 +0300
+++ b/uifw/AvKon/src/AknDef.cpp	Thu May 27 13:07:04 2010 +0300
@@ -21,13 +21,8 @@
 #include "AknDef.h"
 #include <vwsdef.h> // TVwsViewId
 
-#ifdef RD_IDLE_SEPARATION
-#include <e32property.h>
-#include <activeidle2domainpskeys.h>
-#endif
-
-const TInt KPhoneUid( 0x100058B3 );
-const TInt KActiveIdle2Uid( 0x102750F0 );
+const TUid KPhoneUid = { 0x100058B3 };
+const TUid KPhoneViewUid = { 0x10282D81 };
 
 // -----------------------------------------------------------------------------
 // AknDef::GetPhoneIdleViewId()
@@ -38,56 +33,9 @@
 //
 EXPORT_C TInt AknDef::GetPhoneIdleViewId(TVwsViewId& aViewId)
     {
-    TInt uidValue = NULL;
-    TInt retVal = KErrNone;
-
-#ifdef RD_IDLE_SEPARATION
-    retVal = RProperty::Get( KPSUidAiInformation, KActiveIdleUid, uidValue );
-    if(retVal == KErrNotFound)
-        {
-        retVal = KErrNone;
-        uidValue = KPhoneUid;
-        }
-#else
-    uidValue = KPhoneUid;  // Was defined as KAknPhoneIdleViewId in akndef.h.
-#endif // RD_IDLE_SEPARATION
-
-    if(retVal == KErrNone)
-        {
-        aViewId = TVwsViewId(TUid::Uid(uidValue), TUid::Uid(uidValue));
-        }
-        
-#ifdef RD_BOOT_CUSTOMIZABLE_AI
-
-    // ActiveIdle2 is view-based, so this is a temporary fix
-    // in order to be able to activate idle from app shell with menu-key,
-    // until a proper way for view uid acquisition is made.
-    
-    TInt pluginRangeStart;
-    TInt pluginRangeEnd;
-    
-    RProperty::Get( KPSUidAiInformation, KAIActivePluginRangeStart, pluginRangeStart );
-    RProperty::Get( KPSUidAiInformation, KAIActivePluginRangeEnd, pluginRangeEnd );
-    
-    if ( uidValue >= pluginRangeStart && uidValue <= pluginRangeEnd && pluginRangeEnd )
-        {
-        uidValue = KActiveIdle2Uid;
-        aViewId.iAppUid = TUid::Uid( uidValue );
-        }
-    else if ( uidValue >= pluginRangeStart ) // end UID may not be defined
-        {
-        uidValue = KActiveIdle2Uid;
-        aViewId.iAppUid = TUid::Uid( uidValue );
-        }
-    
-    if ( uidValue == KActiveIdle2Uid )
-        {
-        aViewId.iViewUid = TUid::Uid(1);
-        }
-        
-#endif // RD_BOOT_CUSTOMIZABLE_AI
-
-    return retVal; 
+    aViewId.iAppUid = KPhoneUid;
+    aViewId.iViewUid = KPhoneViewUid;
+    return KErrNone;
     }
 
 //  End of File  
--- a/uifw/EikStd/srvuisrc/EIKSRVUI.CPP	Fri May 14 16:06:26 2010 +0300
+++ b/uifw/EikStd/srvuisrc/EIKSRVUI.CPP	Thu May 27 13:07:04 2010 +0300
@@ -126,6 +126,7 @@
 
 #include <hb/hbcore/hbsymbianvariant.h>
 #include <hb/hbcore/hbdevicedialogsymbian.h>
+#include <apaidpartner.h>
 
 #if defined(__WINS__)
 const TInt KEikServSideBarWidth = 35;