Revert incorrect RCL_3 drop: RCL_3 PDK_3.0.2 PDK_3.0.3
authorPat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:30:56 +0100
branchRCL_3
changeset 45 cbffe13eac63
parent 44 12f60d9a73b3
child 49 a7ccb69868af
Revert incorrect RCL_3 drop: Revision: 201031 Kit: 201035
csxhelp/AiwHelpProvider/group/AiwHelpProvider.mmp
csxhelp/AiwHelpProvider/group/bld.inf
csxhelp/AiwHelpProvider/inc/AiwHelpProvider.h
csxhelp/AiwHelpProvider/inc/AiwHelpProvider.rh
csxhelp/AiwHelpProvider/loc/aiwxhelpprovider.loc
csxhelp/AiwHelpProvider/src/10207464.rss
csxhelp/AiwHelpProvider/src/AiwHelpProvider.cpp
csxhelp/AiwHelpProvider/src/AiwHelpProvider.rss
csxhelp/HelpEngine/inc/CSXHContextTopic.h
csxhelp/HelpEngine/inc/CSXHGenericTOC1.h
csxhelp/HelpEngine/inc/CSXHGenericTOC2.h
csxhelp/HelpEngine/inc/CSXHHTMLContentParser.h
csxhelp/HelpEngine/inc/CSXHHelpContentBase.h
csxhelp/HelpEngine/inc/CSXHHelpDataBase.h
csxhelp/HelpEngine/inc/CSXHHtmlTOC1.h
csxhelp/HelpEngine/inc/CSXHHtmlTOC2.h
csxhelp/HelpEngine/inc/CSXHKywdTOC1.h
csxhelp/HelpEngine/inc/CSXHKywdTopics.h
csxhelp/HelpEngine/inc/CSXHLegacyContentParser.h
csxhelp/HelpEngine/inc/CSXHLegacyTOC1.h
csxhelp/HelpEngine/inc/CSXHLegacyTOC2.h
csxhelp/HelpEngine/inc/CSXHMainTopics.h
csxhelp/HelpEngine/inc/CSXHRuntimeIndexing.h
csxhelp/HelpEngine/inc/CSXHViewIDs.h
csxhelp/HelpEngine/inc/CSXHXMLParseHandler.h
csxhelp/HelpEngine/inc/CsHelpCmdLineParser.h
csxhelp/HelpEngine/inc/csxhconstants.h
csxhelp/HelpEngine/rss/HelpEngine.rss
csxhelp/HelpEngine/src/CSXHContextTopic.cpp
csxhelp/HelpEngine/src/CSXHGenericTOC1.cpp
csxhelp/HelpEngine/src/CSXHGenericTOC2.cpp
csxhelp/HelpEngine/src/CSXHHTMLContentParser.cpp
csxhelp/HelpEngine/src/CSXHHelpContentBase.cpp
csxhelp/HelpEngine/src/CSXHHelpDataBase.cpp
csxhelp/HelpEngine/src/CSXHHtmlTOC1.cpp
csxhelp/HelpEngine/src/CSXHHtmlTOC2.cpp
csxhelp/HelpEngine/src/CSXHKywdTOC1.cpp
csxhelp/HelpEngine/src/CSXHKywdTopics.cpp
csxhelp/HelpEngine/src/CSXHLegacyContentParser.cpp
csxhelp/HelpEngine/src/CSXHLegacyTOC1.cpp
csxhelp/HelpEngine/src/CSXHLegacyTOC2.cpp
csxhelp/HelpEngine/src/CSXHMainTopics.cpp
csxhelp/HelpEngine/src/CSXHRuntimeIndexing.cpp
csxhelp/HelpEngine/src/CSXHXMLParseHandler.cpp
csxhelp/HelpEngine/src/CsHelpCmdLineParser.cpp
csxhelp/HelpEngine/src/HelpEngine.cpp
csxhelp/aif/CsHelp_Caption.rss
csxhelp/aif/CsHelpaif.rss
csxhelp/data/CsHelp.rss
csxhelp/data/Cshelp_reg.rss
csxhelp/data/lch.rh
csxhelp/data/lch.rss
csxhelp/group/HelpEngine.mmp
csxhelp/group/HelpEnginearm.def
csxhelp/group/HelpEnginewinscw.def
csxhelp/group/bld.inf
csxhelp/group/cshelp.mmp
csxhelp/inc/AppLauncherForCSXH.h
csxhelp/inc/CSXHAppUi.h
csxhelp/inc/CSXHApplication.h
csxhelp/inc/CSXHDocument.h
csxhelp/inc/CSXHGenericContainer.h
csxhelp/inc/CSXHGenericView.h
csxhelp/inc/CSXHHtmlTopicContainer.h
csxhelp/inc/CSXHHtmlTopicView.h
csxhelp/inc/CSXHLegacyTopicContainer.h
csxhelp/inc/CSXHLegacyTopicView.h
csxhelp/inc/CsHelp.hrh
csxhelp/inc/cshelp.laf
csxhelp/inc/csxhruntimeappwatcher.h
csxhelp/loc/csxhelp.loc
csxhelp/rom/AiwHelpProvider.iby
csxhelp/rom/AiwHelpProviderResources.iby
csxhelp/rom/Cshelp.iby
csxhelp/rom/CshelpResources.iby
csxhelp/src/AppLauncherForCSXH.cpp
csxhelp/src/CSXH.cpp
csxhelp/src/CSXHAppUi.cpp
csxhelp/src/CSXHApplication.cpp
csxhelp/src/CSXHDocument.cpp
csxhelp/src/CSXHGenericContainer.cpp
csxhelp/src/CSXHGenericView.cpp
csxhelp/src/CSXHHtmlTopicContainer.cpp
csxhelp/src/CSXHHtmlTopicView.cpp
csxhelp/src/CSXHLegacyTopicContainer.cpp
csxhelp/src/CSXHLegacyTopicView.cpp
csxhelp/src/csxhruntimeappwatcher.cpp
group/bld.inf
helps_info/helps_metadata/helps_metadata.mrp
layers.sysdef.xml
package_definition.xml
symhelp/helpmodel/TestData/Source/ER5Help/General/Symbols page.mbm
symhelp/helpmodel/TestData/Source/ER5Help/epochlp.alp.tmp
symhelp/helpmodel/TestData/Source/ER5Help/epochlp.alp.xml.bak
symhelp/helpmodel/TestData/Source/ER5Help/epochlp.tmp
symhelp/helpmodel/TestData/Source/ER5Help/uk.alc.tmp
symhelp/helpmodel/documentation/HLPMODEL test code.rtf
sysdef_1_4_0.dtd
sysdef_1_5_1.dtd
systemDefinition.xml
systemDefinitionLayer.xml
userguide/Userguide.pro
userguide/inc/BrowserWrapper.h
userguide/inc/HelpBaseView.h
userguide/inc/HelpCategoryView.h
userguide/inc/HelpCommon.h
userguide/inc/HelpContentsView.h
userguide/inc/HelpDataProvider.h
userguide/inc/HelpDocumentLoader.h
userguide/inc/HelpKeywordView.h
userguide/inc/HelpMainWindow.h
userguide/inc/HelpProxyModel.h
userguide/inc/HelpStandardItem.h
userguide/inc/HelpUtils.h
userguide/resources/Userguide.qrc
userguide/resources/images/qtg_mono_link_nokia.svg
userguide/resources/images/qtg_mono_search.svg
userguide/resources/images/qtg_mono_show_all.svg
userguide/resources/xml/baseView.docml
userguide/resources/xml/categoryView.docml
userguide/resources/xml/contentsView.docml
userguide/resources/xml/keywordView.docml
userguide/rom/userguide.iby
userguide/rom/userguide.pri
userguide/rom/userguide_resources.iby
userguide/src/BrowserWrapper.cpp
userguide/src/HelpBaseView.cpp
userguide/src/HelpCategoryView.cpp
userguide/src/HelpContentsView.cpp
userguide/src/HelpDataProvider.cpp
userguide/src/HelpDocumentLoader.cpp
userguide/src/HelpKeywordView.cpp
userguide/src/HelpMainWindow.cpp
userguide/src/HelpProxyModel.cpp
userguide/src/HelpStandardItem.cpp
userguide/src/HelpUtils.cpp
userguide/src/HelpUtils_win.cpp
userguide/src/main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/AiwHelpProvider/group/AiwHelpProvider.mmp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project specfication file.
+*                Write all source and resource files, all using libraries, 
+*                all bitmaps.
+*
+*/
+
+
+#include <platform_paths.hrh>
+#include <data_caging_paths.hrh>
+
+TARGET          AiwHelpProvider.dll
+TARGETTYPE      PLUGIN
+
+// MAGIC Dll recognition UID followed by the unique UID for this dll
+UID             0x10009D8D 0x10207464
+VENDORID        VID_DEFAULT
+
+CAPABILITY      CAP_ECOM_PLUGIN
+
+USERINCLUDE     ../inc
+APP_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE   /epoc32/include/ECom
+
+SOURCEPATH      ../src
+SOURCE          AiwHelpProvider.cpp
+
+// Published to /resource/plugins
+START RESOURCE  10207464.rss
+LANGUAGE_IDS
+TARGET          AiwHelpProvider.rsc
+END
+
+// Published to /resource
+START RESOURCE  AiwHelpProvider.rss
+HEADER
+TARGET          AiwHelpProviderPlugin.rsc
+TARGETPATH      APP_RESOURCE_DIR 
+LANGUAGE_IDS
+END
+
+LIBRARY         euser.lib
+LIBRARY         fbscli.lib
+LIBRARY         gdi.lib
+LIBRARY         bafl.lib
+LIBRARY         cone.lib
+LIBRARY         estlib.lib
+LIBRARY         servicehandler.lib
+LIBRARY         eikcore.lib
+LIBRARY			hlplch.lib
+LIBRARY     	ws32.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/AiwHelpProvider/group/bld.inf	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     The build information
+*
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_EXPORTS
+// export localised loc file
+../loc/aiwxhelpprovider.loc        APP_LAYER_LOC_EXPORT_PATH(aiwxhelpprovider.loc)
+
+PRJ_MMPFILES
+AiwHelpProvider.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/AiwHelpProvider/inc/AiwHelpProvider.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  header file.
+*
+*/
+
+
+
+#ifndef _AIW_HELP_PROVIDER_H
+#define _AIW_HELP_PROVIDER_H
+
+#include <AiwServiceIfMenu.h>
+
+class CAiwHelpProvider : public CAiwServiceIfMenu 
+    {
+    public: 
+        static CAiwHelpProvider* NewL();
+        ~CAiwHelpProvider();
+
+    public: 
+        virtual void InitialiseL(
+            MAiwNotifyCallback& aFrameworkCallback,
+            const RCriteriaArray& aInterest);
+
+        virtual void HandleServiceCmdL(
+            const TInt& aCmdId,
+            const CAiwGenericParamList& aInParamList,
+            CAiwGenericParamList& aOutParamList,
+            TUint aCmdOptions = 0,
+            const MAiwNotifyCallback* aCallback = NULL);
+
+        virtual void InitializeMenuPaneL(
+            CAiwMenuPane& aMenuPane,
+            TInt aIndex,
+            TInt aCascadeId,
+            const CAiwGenericParamList& aInParamList);
+
+        virtual void HandleMenuCmdL(
+            TInt aMenuCmdId,
+            const CAiwGenericParamList& aInParamList,
+            CAiwGenericParamList& aOutParamList,
+            TUint aCmdOptions = 0,
+            const MAiwNotifyCallback* aCallback = NULL);
+
+    private:
+        CAiwHelpProvider();
+    };
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/AiwHelpProvider/inc/AiwHelpProvider.rh	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  resource header file
+*                Declare all the enums used here in this file.
+*
+*/
+
+
+#ifndef _AIW_PROVIDER_EXAMPLE1_RH
+#define _AIW_PROVIDER_EXAMPLE1_RH
+
+enum
+    {
+    EAiwShowHelpCmd=1
+    };
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/AiwHelpProvider/loc/aiwxhelpprovider.loc	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     This is a localisation file for AiwHelpProvider
+*     A .loc file is the one and only place where the logical strings
+*     to be localised are defined.
+*
+*
+*/
+
+
+//  LOCALISATION STRINGS
+
+//d: help application name in selection grid window
+//l: list_single_pane_t1_cp2
+//
+#define qtn_options_help_sm_help          "Show Help"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/AiwHelpProvider/src/10207464.rss	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  resource file
+*                Write all resources used here.
+*
+*/
+
+
+
+#include <Eikon.rh>
+#include "RegistryInfoV2.rh" 
+#include "AiwHelpProvider.rh"
+#include <AiwCommon.hrh>
+
+RESOURCE REGISTRY_INFO theInfo
+    {
+    resource_format_version = RESOURCE_FORMAT_VERSION_2; 
+    dll_uid = 0x10207464; // dll uid
+    interfaces = 
+        {
+        INTERFACE_INFO
+            {
+            // Menu service class (offers menu based services)
+            interface_uid = 0x101F8652; // KAiwClassMenu
+            implementations = 
+                {
+                IMPLEMENTATION_INFO
+                    {
+                    implementation_uid = 0x10207465;// The implementation uid
+                    version_no = 1;
+                    display_name = "AIW Help Provider";
+                    default_data ="*"; 
+                    opaque_data =KAiwCmdHelpStr; // from AiwCommon.hrh
+                    }
+                };
+            }
+        };
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/AiwHelpProvider/src/AiwHelpProvider.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,236 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  source file.
+*                Write all source code here, all the implementations
+*
+*/
+
+
+#include <eikmenup.h>
+#include "AiwHelpProvider.h"
+#include <AiwMenu.h>
+#include <barsread.h>
+#include <eikenv.h>
+#include <AiwHelpProviderPlugin.rsg>
+#include <ImplementationProxy.h>
+#include "AiwHelpProvider.rh"
+#include <AiwServiceIfMenu.h>
+#include <AiwCommon.h>
+#include <hlplch.h>
+#include <coemain.h>
+#include <avkon.hrh>
+
+
+_LIT(KResFileName, "\\resource\\apps\\AiwHelpProviderPlugin.rsc");
+
+#define KImplementationId 0x10207465
+
+
+
+/******************************************************************
+===================================================================
+						NewL of the Provider
+===================================================================
+*******************************************************************/						
+CAiwHelpProvider* CAiwHelpProvider::NewL()
+    {
+    return new (ELeave) CAiwHelpProvider();
+    }
+
+
+    
+/******************************************************************
+===================================================================
+						Constructor of the Provider
+===================================================================
+*******************************************************************/
+CAiwHelpProvider::CAiwHelpProvider()
+    {
+    }
+
+
+
+/******************************************************************
+===================================================================
+					Destructor of the Provider
+===================================================================
+*******************************************************************/
+CAiwHelpProvider::~CAiwHelpProvider()
+    {
+    }
+    
+    
+    
+/**
+        * Called by the Handler framework to initialise provider with
+        * necessary information from Handler.
+        * @param aFrameworkCallback Framework provided callback for
+        *        provider to send events to framework
+        * @param aInterest List of criteria items which invoked the provider.
+        * @exception Symbian OS error code
+        */
+void CAiwHelpProvider::InitialiseL(MAiwNotifyCallback& /*aFrameworkCallback*/,
+    const RCriteriaArray& /*aInterest*/)
+    {
+    
+    }
+
+
+/**
+        * Executes generic service commands included in criteria.
+        * @param aCmdId Command to be executed
+        * @param aInParamList Input parameters, can be an empty list
+        * @param aOutParamList Output parameters, can be an empty list
+        * @param aCmdOptions Options for the command, see KAiwOpt* constants in AiwCommon.hrh.
+        * @param aCallback callback for asynchronous command handling, parameter checking, etc.
+        * @see enum TAiwServiceCmdOptions in AiwCommon.hrh
+        * @exception KErrArgument if callback is missing when required.
+        * @exception KErrNotSupported if no provider support service
+        */
+void CAiwHelpProvider::HandleServiceCmdL(const TInt& /*aCmdId*/,
+    const CAiwGenericParamList& /*aInParamList*/,
+    CAiwGenericParamList& /*aOutParamList*/,
+    TUint aCmdOptions,
+    const MAiwNotifyCallback* /*aCallback*/)
+    {
+ 	// Cancel bit must always be checked. 
+    if(aCmdOptions & KAiwOptCancel)
+        {
+        return;
+        }
+    }
+/**
+        * Initialises menu pane by adding provider specific menu items.
+        * The AIW Framework gives the parameters to be used in addition.
+        * @param aMenuPane Menu pane handle
+        * @param aIndex position of item where to add menu items.
+        * @param aCascadeId ID of cascade menu item.
+        * @param aInParamList input parameter list for provider's parameters checking
+        */
+        
+void CAiwHelpProvider::InitializeMenuPaneL(CAiwMenuPane& aMenuPane,
+    TInt aIndex,
+    TInt /*aCascadeId*/,
+    const CAiwGenericParamList& /*aInParamList*/)
+    {
+    TFileName resFile(KResFileName);
+    TFileName dllName;
+    Dll::FileName(dllName);
+    TBuf<2> drive = dllName.Left(2);
+    resFile.Insert(0, drive);
+    aMenuPane.AddMenuItemsL(resFile, R_AIWHELPPROVIDER_MENU, KAiwCmdHelp, aIndex);
+    }
+
+/**
+        * Handle a menu command invoked by the Handler.
+        * @param aMenuCmdId Command ID for the menu command,
+        *        defined by the provider when adding the menu commands.
+        * @param aInParamList Input parameters, could be empty list
+        * @param aOutParamList Output parameters, could be empty list
+        * @param aCmdOptions Options for the command, see KAiwCmdOpt* constants.
+        * @param aCallback callback if asynchronous command handling is wanted by consumer.
+        *    The provider may or may not support this, leaves with KErrNotSupported, it not.
+        */
+void CAiwHelpProvider::HandleMenuCmdL(TInt aMenuCmdId,
+    const CAiwGenericParamList& aInParamList,
+    CAiwGenericParamList& /*aOutParamList*/,
+    TUint aCmdOptions,
+    const MAiwNotifyCallback* /*aCallback*/)
+    {
+    // Cancel bit must always be checked.
+    if(aCmdOptions & KAiwOptCancel)
+        {
+        return;
+        }
+           
+    switch (aMenuCmdId)
+	    {
+	    case EAiwShowHelpCmd:
+	    case EAknCmdHelp:
+		    {
+		    TCoeHelpContext helpContext;
+		    TInt index;
+		        
+		    // Get the UID of the Help context i.e. the UID of the CS Help file containing 
+		    // the topic information.
+
+		    index = 0;
+		    const TAiwGenericParam* uidParam = aInParamList.FindFirst(index, EGenericParamHelpItem, 
+		        EVariantTypeTUid);
+
+		    if(index >= 0)
+		        {
+		        // Get the data.
+		        const TAiwVariant& val = uidParam->Value();
+		        helpContext.iMajor = val.AsTUid();
+		        }
+		    else
+		        {
+		        // UID param not found. Error handling could be added here.
+		        }            
+		        
+		    // Get the context of Help i.e. the name of the help context. This is the literal 
+		    // descriptor generated from a context string by the CSHelp compiler.          
+
+		    index = 0;
+		    const TAiwGenericParam* contextParam = aInParamList.FindFirst(index, EGenericParamHelpItem, 
+		        EVariantTypeDesC);
+
+		    if(index >= 0)
+		        {
+		        // Get the data.
+		        const TAiwVariant& val = contextParam->Value();
+		        helpContext.iContext = val.AsDes();
+		        }
+		    else
+		        {
+		        // Context param not found. Error handling could be added here.
+		        }             
+		                            
+		    CArrayFix<TCoeHelpContext>* contextList = new (ELeave) CArrayFixFlat<TCoeHelpContext>(1);
+		    contextList->AppendL(helpContext);
+		    
+		    //Get the Window server session
+		    RWsSession wsSession;
+		    User::LeaveIfError(wsSession.Connect());
+		    CleanupClosePushL(wsSession);
+		    HlpLauncher::LaunchHelpApplicationL(wsSession,contextList);
+		    CleanupStack::PopAndDestroy();
+		    break;
+		    }
+        default:
+            break;
+        }
+    }
+
+//
+// Rest of the file is for ECom initialization. 
+//
+
+// Map the interface UIDs to implementation factory functions
+const TImplementationProxy ImplementationTable[] =
+    {
+        IMPLEMENTATION_PROXY_ENTRY(KImplementationId, CAiwHelpProvider::NewL)
+    };
+
+// ---------------------------------------------------------
+// Exported proxy for instantiation method resolution
+// ---------------------------------------------------------
+//
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+    {
+    aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+    return ImplementationTable;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/AiwHelpProvider/src/AiwHelpProvider.rss	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  resource file
+*                Write the menu resources here.
+*
+*/
+
+
+
+#include <Eikon.rh>
+#include "RegistryInfoV2.rh" 
+#include "AiwHelpProvider.rh"
+#include <aiwxhelpprovider.loc>
+#include <AiwCommon.hrh>
+#include <avkon.loc>
+
+RESOURCE MENU_PANE r_aiwhelpprovider_menu
+    {
+    items =
+        {
+        MENU_ITEM { command = AIW_SUBMENU_TITLE; txt = qtn_options_help; },
+        MENU_ITEM { command = EAiwShowHelpCmd; txt = qtn_options_help;extratxt = qtn_options_help_sm_help;  }
+     
+        };
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHContextTopic.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHContextTopic class declaration
+*
+*/
+
+
+#ifndef INC_CSXHCONTEXTTOPIC_H_HEADER_INCLUDED_BC050AFE
+#define INC_CSXHCONTEXTTOPIC_H_HEADER_INCLUDED_BC050AFE
+
+#include "CSXHHelpContentBase.h"
+
+class CCSXHHelpDataBase;
+/** 
+* @class CCSXHContextTopic
+* This class is used for Context Sensitivity   
+*/
+class CCSXHContextTopic : public CCSXHHelpContentBase
+    {
+  public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHContextTopic 
+*  and return a pointer to the created object
+*  @param aToc2 	- a toc2 class pointer type casted to database
+*  @return a CCSXHContextTopic Pointer 
+*/
+	static CCSXHContextTopic* NewL(CCSXHHelpContentBase* aToc2);
+/** 
+ * @function ~CCSXHContextTopic
+ * @since S60 3.2
+ * Destroy the object and release all memory objects
+ */  	
+    ~CCSXHContextTopic();
+/** 
+*  @function GetViewID
+*  @since S60 3.2
+*  Get ViewId to activate the View
+*  @return View Id
+*/      
+    TUid GetViewID() const;
+/** 
+*  @function GetTopic
+*  @since S60 3.2
+*  Get the Object HTML / Legacy type cast to Database
+*  @return View Id
+*/      
+    IMPORT_C CCSXHHelpContentBase* GetTopic();
+
+  protected:
+/** 
+*  @function CCSXHContextTopic
+*  @since S60 3.2
+*  Construct a CCSXHContextTopic 
+*  @param aToc2object 	- a toc2 class pointer type casted to database
+*/  
+  	CCSXHContextTopic(CCSXHHelpContentBase *aToc2object); 
+  
+  protected:
+  	CCSXHHelpContentBase *iToc2;
+
+  };
+
+
+
+#endif /* INC_CSXHCONTEXTTOPIC_H_HEADER_INCLUDED_BC050AFE */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHGenericTOC1.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHGenericTOC1 class declaration
+*
+*/
+
+
+#ifndef INC_CSXHGENERICTOC1_H_HEADER_INCLUDED_BC050AFE
+#define INC_CSXHGENERICTOC1_H_HEADER_INCLUDED_BC050AFE
+
+#include "CSXHHelpContentBase.h"
+#include <badesca.h>
+
+
+class CCSXHHelpDataBase;
+/** 
+* @class CCSXHGenericTOC1
+* This class has the information of TOC1 
+*/
+class CCSXHGenericTOC1 : public CCSXHHelpContentBase
+    {
+  public:
+/** 
+ * @function ~CCSXHGenericTOC1
+ * @since S60 3.2
+ * Destroy the object and release all memory objects
+ */ 
+    ~CCSXHGenericTOC1();
+/** 
+ * @function FillChildDataL
+ * @since S60 3.2
+ * Fill the array
+ * @param aArray - A pointer to a Descriptor Array	
+ */
+   	IMPORT_C virtual void FillChildDataL(CDesCArray* aArray);
+/** 
+ * @function GetChildL
+ * @since S60 3.2
+ * Fill the array
+ * @param aName - toc1 Name	
+ * @return pointer to toc2 type casted to database class  
+ */
+  	IMPORT_C virtual CCSXHHelpContentBase* GetChildL(const TDesC& aName);
+
+/** 
+ * @function InsertChild
+ * @since S60 3.2
+ * Insert toc2 objects
+ * @param atoc2 - toc2 objects	
+ * @param aDeleteObject - boolean, default True
+ * @return ETrue Successful, EFalse otherwise
+ */  	
+  	TBool InsertChild(CCSXHHelpContentBase* atoc2,TBool aDeleteObject = ETrue);
+  	
+  	TBool InsertChildWithPriority(CCSXHHelpContentBase* aChild, TBool aDeleteObject = ETrue);
+/** 
+ * @function ResetChildList
+ * @since S60 3.2
+ * clear Array, delete the objects
+ * @return ETrue Successful, EFalse otherwise
+ */  	
+  	virtual void ResetChildList();
+  	
+  
+  protected:
+/** 
+*  @function CCSXHGenericTOC1
+*  @since S60 3.2
+*  Construct a CCSXHGenericTOC1 
+*  @param aName 	- TOC1 Name
+*/
+  	CCSXHGenericTOC1(const TDesC& aName, const TInt32 aPriority = 0); 
+  	
+/** 
+*  @function InitChildList
+*  @since S60 3.2
+*  Allocate the Memory for Array
+*/
+  	virtual void InitChildList();
+/** 
+*  @function CopyChildListL
+*  @since S60 3.2
+*  Copy the content to Descriptor Array
+*  @param aArray - Descriptor Array
+*/
+  	virtual void CopyChildListL(CDesCArray* aArray);
+
+/** 
+*  @function ConstructChildList
+*  @since S60 3.2
+*  Fill the toc2 objects in the array
+*  calls ConstructChildListL internally	
+*  @return ETrue on Success, EFalse otherwise
+*/
+  	TBool ConstructChildList();
+  	
+  private:	
+/** 
+*  @function ConstructChildListL
+*  @since S60 3.2
+*  Fill the toc2 objects in the array
+*/
+  	void ConstructChildListL();
+  	
+  protected:
+
+    RPointerArray<CCSXHHelpContentBase> *iChildList;
+
+  };
+
+
+
+#endif /* INC_CSXHGENERICTOC1_H_HEADER_INCLUDED_BC050AFE */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHGenericTOC2.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHGenericTOC2 class declaration
+*
+*/
+
+#ifndef INC_CSXHGENERICTOC2_H_HEADER_INCLUDED_BC05356D
+#define INC_CSXHGENERICTOC2_H_HEADER_INCLUDED_BC05356D
+
+#include "CSXHHelpContentBase.h"
+
+class CCSXHGenericTOC1;
+/** 
+* @class CCSXHGenericTOC2
+* This class has the information of TOC2 
+*/
+class CCSXHGenericTOC2 : public CCSXHHelpContentBase
+    {
+  public:
+/** 
+ * @function GetParent
+ * @since S60 3.2
+ * Get the Parent object
+ * @return pointer to toc1 class object
+ */
+    IMPORT_C CCSXHGenericTOC1* GetParent();
+/** 
+ * @function GetTopicContentL
+ * @since S60 3.2
+ * Get topic  to display
+ * @return pointer to Buffer
+ */
+    virtual TAny* GetTopicContentL() = 0;
+    
+  protected:
+/** 
+*  @function CCSXHGenericTOC2
+*  @since S60 3.2
+*  Construct a CCSXHGenericTOC2 
+*  @param aParent 	- TOC1 object
+*         aName 	- toc2 Name
+*/  
+    CCSXHGenericTOC2(CCSXHGenericTOC1* aParent, const TDesC& aName);
+  	CCSXHGenericTOC1* iParent;
+
+    };
+
+
+
+#endif /* INC_CSXHGENERICTOC2_H_HEADER_INCLUDED_BC05356D */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHHTMLContentParser.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,358 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHHTMLContentParser class declaration
+*
+*/
+
+
+#ifndef __CCSXHHTMLCONTENTPARSER_H__
+#define __CCSXHHTMLCONTENTPARSER_H__
+
+#include "CSXHGenericTOC1.h"
+#include "coehelp.h"
+#include <f32file.h>
+#include <barsc.h> 
+#include <featurecontrol.h>
+
+ 
+class TAppUid;
+class CSenXmlReader;
+class CCSXHXMLParseHandler;
+class CCSXHHtmlTOC1;
+class CCSXHHelpDataBase;
+class CCSXHKywdTOC1;
+class CCoeEnv;
+class CCSXHHelpContentBase;
+class CCSXHGenericTOC2;
+class MSenContentHandlerClient;
+class CCSXHXMLParseHandler_Kywd;
+class CCSXHRuntimeIndexing;
+class CCSXHXMLParseHandler_MetaFile;
+/**
+*  CCSXHHTMLContentParser class.
+*  This class is used to parse XML files & generate Html data
+*  @lib euser.lib SenXml.lib XMLFRAMEWORK.lib	ezip.lib HLPMODEL.LIB
+*  @since 3.2
+*/
+class CCSXHHTMLContentParser : public CBase
+{
+	public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHHTMLContentParser 
+*  and return a pointer to the created object
+*  @param aCoeEnv 	- Control Environment
+*  @return a CCSXHHTMLContentParser Pointer 
+*/	
+		static CCSXHHTMLContentParser* NewL(CCoeEnv* aCoeEnv);
+/** 
+*  @function NewLC
+*  @since S60 3.2
+*  Construct a CCSXHLegacyContentParser 
+*  and return a pointer to the created object using two phase construction
+*  @param aCoeEnv 	- Control Environment
+*  @return a CCSXHLegacyContentParser Pointer 
+*/		
+		static CCSXHHTMLContentParser* NewLC(CCoeEnv *aCoeEnv);
+/** 
+*  @function GenerateTOC1ListL
+*  @since S60 3.2
+*  Generate Html TOC1 Objects 
+*  @param aDataBase 	- Database class pointer
+*/		void GenerateTOC1ListL(CCSXHHelpDataBase* aDataBase);
+/** 
+*  @function GenerateTOC2ListL
+*  @since S60 3.2
+*  Generate Html TOC2 Objects 
+*  @param atoc1 	- generic toc1 class pointer
+*		  aArray	- Database class pointer's array pointer 
+*/
+		void GenerateTOC2ListL(CCSXHGenericTOC1& atoc1, RPointerArray<CCSXHHelpContentBase>* aArray);		
+/** 
+*  @function GetTopicContentL
+*  @since S60 3.2
+*  Get the Buffer for a selected toc2  
+*  @param atoc2 	- generic toc2 class pointer
+*  @return pointer to a buffer
+*/		
+		TAny* GetTopicContentL(CCSXHGenericTOC2* atoc2);
+/** 
+*  @function GetContentsFromFileL
+*  @since S60 3.2
+*  Get the Buffer from a html file
+*  @param htmlFile 	- html file path
+*         aCoeEnv   - Control Environment
+*  @return pointer to a buffer
+*/		
+		static HBufC8* GetContentsFromFileL(const TDesC& htmlFile,CCoeEnv* aCoeEnv,RFeatureControl &aFeatureControl);												   
+
+/** 
+*  @function GetHtmlFileL
+*  @since S60 3.2
+*  Get the html file path
+*  @param aCoeEnv   - Control Environment
+*         aDir      - Directory
+*         TAppUid   - UID
+*         aFileName - FileName(IN/OUT Argument)
+*/		
+		static void GetHtmlFileL(CCoeEnv* aCoeEnv,const short& aDir,
+                                            const TAppUid& aUid,TBuf<KMaxFileName>& aFileName);
+/** 
+ * @function ~CCSXHHTMLContentParser
+ * @since S60 3.2
+ * Destroy the object and release all memory objects
+ */ 		
+		~CCSXHHTMLContentParser();
+
+/** 
+*  @function GenerateKywdTOC1ListL
+*  @since S60 3.2
+*  Generate Html Keyword TOC1 Objects 
+*  @param aDataBase 	- Database class pointer
+*/		
+		void GenerateKywdTOC1ListL(CCSXHHelpDataBase* aDataBase);
+/** 
+*  @function GenerateTOC2ListForKeywordSearchL
+*  @since S60 3.2
+*  Generate Html Keyword TOC2 Objects 
+*  @param aDataBase 	- Database class pointer
+*  @param akywdtoc1	- keyword toc1 class pointer
+*/		
+		void GenerateTOC2ListForKeywordSearchL(CCSXHHelpDataBase* aDataBase,
+										CCSXHKywdTOC1* akywdtoc1);
+/** 
+*  @function GetContextTopicL
+*  @since S60 3.2
+*  Get the help Context object
+*  @param aContextName - Help context object
+*  @param aUid - Help content UID
+*  @return Help content class pointer 
+*/		
+		CCSXHHelpContentBase* GetContextTopicL(CCSXHHelpDataBase *aDataBase, 
+				                        TUid &aUid, TCoeContextName &aContextName);
+/** 
+*  @function GetHtmlTopicForUrlL
+*  @since S60 3.2
+*  Get the toc2 object in order to get Content
+*  @param  aurl - Full File Path
+*  @return pointer to database	
+*/		
+		CCSXHHelpContentBase* GetHtmlTopicForUrlL(const TDesC& aurl);
+
+/** 
+*  @function IsUidCategoryPresent
+*  @since S60 3.2
+*  Check for Existance of Appication Uid
+*  @param aUid - Application Uid
+*  @return  ETrue if exists, EFalse otherwise
+*/		
+		TBool IsUidCategoryPresent(const TUid& aUid);
+		
+		
+		void InsertHTMLToc1L(const TDesC &appUidName,const TDesC &appName,const TInt& aDrive,
+		                        CCSXHHelpDataBase* aDataBase, const TDesC &FeatureIds, TInt32 aPriority);
+		
+/** 
+*  @function GetHTMLToc1
+*  @since S60 3.2
+*  Get the HTML TOC1 object
+*  @param aUid 					- Application Uid
+*		  aCurrentHtmlToc1	   	- HTMLTOC1 pointer
+*  @return  ETrue if present, EFalse otherwise
+*/	        
+	TBool GetHTMLToc1(const TDesC& aUid,CCSXHXMLParseHandler* aParser);	        		                        
+
+	TBool CheckFeatureIDL(const TDesC& aFeatueIds);
+	private:
+/** 
+*  @function CCSXHHTMLContentParser
+*  @since S60 3.2
+*  Construct a CCSXHHTMLContentParser
+*  @param aCoeEnv  - Control Environment
+*/ 	
+		CCSXHHTMLContentParser(CCoeEnv* aCoeEnv);
+/** 
+*  @function InitializeReaderL
+*  @since S60 3.2
+*  Create XMLParse Objects
+*  @param aXMLParser  - Pointer to XML parse Handler
+*/ 
+		void InitializeReaderL(CCSXHXMLParseHandler* aXMLParser);
+/** 
+*  @function InitializeParserAndReaderL
+*  @since S60 3.2
+*  Delete XMLParse Objects
+*  @param aXMLParser  - Pointer to XML parse Handler
+*/ 
+		void ClearReader();
+/** 
+*  @function ConstructL
+*  @since S60 3.2
+*  perform the second phase construction
+*/ 		
+		void ConstructL();
+/** 
+*  @function ScanAndParseXMLfileToCreateTOC1ObjectL
+*  @since S60 3.2
+*  perform the second phase construction
+*  @param aFileSession - FileSession
+*		  ascanner	   - CDirScan pointer
+*		  aDatabase	   - Database pointer
+*		  aDrive	   - Drive Number
+*		  aXMLParser   - XMLParserhandler pointer		
+*/
+		void ScanAndParseXMLfileToCreateTOC1ObjectL(RFs& aFileSession,CDirScan* ascanner,
+												   CCSXHHelpDataBase* aDataBase,
+												   const TInt& aDrive,
+												   CCSXHXMLParseHandler_MetaFile* aXMLParser);		
+
+
+		
+		TBool IsRomBasedContentL( RFs& FileSession, const TDesC &aUid );
+/** 
+*  @function HandleMasterMetaFileL(
+*  @since S60 3.2
+*  perform the second phase construction
+*  @param aFileSession - FileSession
+*		  aDatabase	   - Database pointer
+*		  aRootDir	   - Root directory
+*         aPrevHandler  - Previous Content Handler
+*  @return  ETrue if handled, EFalse otherwise
+*/
+	    TBool HandleMasterMetaFileL(CCSXHHelpDataBase* aDataBase, 
+	        TChar& aDrive, MSenContentHandlerClient *aPrevHandler);
+
+/** 
+*  @function IsRedirectedL(
+*  @param aDatabase	    - Database pointer
+*		  aPath	        - Context root directory
+*		  aUid          - App uid
+*         aContextName  - file name
+*  @return  ETrue if the context is redirected successfully, EFalse otherwise
+*/
+	    TBool IsRedirectedL(CCSXHHelpDataBase *aDataBase, 
+	        			const TDesC &aPath, TUid &aUid, TCoeContextName &aContextName);
+/** 
+*  @function HandleMasterKeywordFileL(
+*  @since S60 3.2
+*  parse makster keywords file
+*  @param aDatabase	   - Database pointer
+*  @return  ETrue if handled, EFalse otherwise
+*/		TBool HandleMasterKeywordFileL(CCSXHHelpDataBase* aDataBase);
+
+
+		static	TBool GetHTMLContentPathForDriveL(TBuf<KMaxFileName>* aContentDrive,CCoeEnv *aCoeEnv);
+
+/** 
+*  @function IsAppUIdPresentAlready(
+*  @since S60 3.2
+*  Check duplicate Uids
+*  @param aUid	   - Application Uid
+*  @return  ETrue if dupicate is identified, EFalse otherwise
+*/		
+		TBool IsAppUIdPresentAlready(const TDesC& aUid);
+
+/** 
+*  @function GetCorrespondingTOC1FromMainArray(
+*  @since S60 3.2
+*  Get TOC1 object from the main array, which is used to display Main topic view.
+*  @param aApplicationName	   - Application Name
+*  @return  pointer to HTML toc1.
+*/		
+		CCSXHHtmlTOC1* GetCorrespondingTOC1FromMainArray(const TDesC& aApplicationName);
+
+/** 
+*  @function ParseKeywdFileAndCreatekywdTOC1Objects
+*  @since S60 3.2
+*  Parse keyword.xml file and Create kywd TOC1 objects.
+*  @param aTOC1ObjectsArray	   - Array of HTMLToc1Objects
+*		  XMLParser			   - pointer to XML parse handler.
+*		  bMasterKeywordFilePresent - Boolean parameter	  	
+*/		
+		
+		void ParseKeywdFileAndCreatekywdTOC1ObjectsL(RPointerArray<CCSXHHtmlTOC1>& aTOC1ObjectsArray,
+				CCSXHXMLParseHandler_Kywd* XMLParser, TBool bMasterKeywordFilePresent);
+				
+/** 
+*  @function ParseKeywdFileAndCreatekywdTOC1Objects
+*  @since S60 3.2
+*  Parse keyword.xml file and Create kywd TOC1 objects.
+*  @param aTOC1ObjectsArray	   - Array of HTMLToc1Objects
+*		  aUrl			   	   - html file path
+*/		
+
+		CCSXHHelpContentBase* CCSXHHTMLContentParser::GetObjectBasedonUrlL(RPointerArray<CCSXHHtmlTOC1>& aTOC1ObjectsArray,
+							  const TDesC& aUrl,TBool aMainArrayList);    
+		
+/** 
+*  @function GetSupportedFeatureListL
+*  @since S60 3.2
+*  Get enabled featureIds in the current build
+*/		
+		void GetSupportedFeatureListL();
+
+/** 
+*  @function CreateBufferForCSSContentL
+*  @since S60 3.2
+*  Create CSS Content using enabled featureIds
+*  @param aFeatureControl	   - RFeatureControl instance
+*/		
+		static HBufC8* CreateBufferForCSSContentL(RFeatureControl& aFeatureControl);
+
+/** 
+*  @function GetContentsFromHTMLFileL
+*  @since S60 3.2
+*  Read the contents from HTML file
+*  @param htmlFile	   - HTML file name
+*		  aCoeEnv	   - Control Environment
+*/		
+		
+		static HBufC8* GetContentsFromHTMLFileL(const TDesC& htmlFile, CCoeEnv* aCoeEnv);
+
+/** 
+*  @function MergeCssAndHTMLContentL
+*  @since S60 3.2
+*  Merge CSS and HTML Content 
+*  @param aHTMLBuffer	   - HTML file content
+*		  aCssContent	   - CSS content
+*/		
+		
+		static HBufC8* MergeCssAndHTMLContentL(HBufC8* aHTMLBuffer, HBufC8* aCssContent);
+
+		static void AppendStyleSheetContent_listitem(TPtr8& abufferptr,TInt aFeatureIdCount,
+										RFeatureUidArray& aSupportedFeatures,CArrayFix<TInt>& alanguageCodeArray);
+		static void AppendStyleSheetContent_paragraph(TPtr8& abufferptr,TInt aFeatureIdCount,
+										RFeatureUidArray& aSupportedFeatures,CArrayFix<TInt>& alanguageCodeArray);
+		static void AppendStyleSheetContent_ahref(TPtr8& abufferptr,TInt aFeatureIdCount,
+										RFeatureUidArray& aSupportedFeatures,CArrayFix<TInt>& alanguageCodeArray);
+		static void AppendStyleSheetContent_none(TPtr8& abufferptr,TInt aFeatureIdCount,
+										RFeatureUidArray& aSupportedFeatures);													   
+	private:		
+		CSenXmlReader *iXmlReader;
+		
+		//Store all the created HTML TOC1 objects for future reference.
+		RPointerArray<CCSXHHtmlTOC1> iHtmlTOC1List,iDuplicateHelpTopicList;
+		CCoeEnv *iCoeEnv;
+
+		RFeatureUidArray iSupportedFeatures;
+		RFeatureControl iFeatureControl;
+		//Input Language variation changes
+		CDesCArray* iSupportedInputLanguages;
+		CDesCArray* iFeatureManager_FeatureIds;
+		CCSXHRuntimeIndexing* iIndexing;
+
+};
+
+#endif 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHHelpContentBase.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,116 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHHelpContentBase class declaration
+*
+*/
+
+
+#ifndef INC_CSXHHELPCONTENTBASE_H_HEADER_INCLUDED_BC0553D0
+#define INC_CSXHHELPCONTENTBASE_H_HEADER_INCLUDED_BC0553D0
+
+#include <e32std.h>
+#include <e32base.h>
+
+const TInt KMaxHelpTopicName = 30;
+/** 
+* @class CCSXHGenericTOC1
+* This class is the base class for GenericTOC1 & GenericTOC2
+*/
+class CCSXHHelpContentBase : public CBase
+    {
+  public:
+  /** 
+ * @function ~CCSXHHelpContentBase
+ * @since S60 3.2
+ * Destroy the object and release all memory objects
+ */ 
+    virtual ~CCSXHHelpContentBase();
+
+/** 
+*  @function GetViewID
+*  @since S60 3.2
+*  Get ViewId to activate the View
+*  @return View Id
+*/    
+    IMPORT_C virtual TUid GetViewID() const = 0;
+
+/** 
+*  @function GetName
+*  @since S60 3.2
+*  Get the name
+*  @return Pointer which contains Name
+*/
+    IMPORT_C TPtr GetName() const;
+    
+    TInt32 Priority() const;
+
+  protected:
+/** 
+*  @function CCSXHHelpContentBase
+*  @since S60 3.2
+*  Construct a CCSXHHelpContentBase 
+*  @param aName 	- Name
+*/  
+    CCSXHHelpContentBase(const TDesC& name, const TInt32 aPriority = 0);
+
+  private:
+    // 1. For Generic TOC1: The TOC1 entry name
+    // 2. For Generic TOC2: The TOC2 entry name
+    // 3. For help database: Unused
+    //TBuf<KMaxHelpTopicName> iName;
+    //typedef TBuf<30> TCoeContextName;
+    
+    HBufC *iName;
+    TInt32 iPriority;
+    
+    template <class T>
+    friend TInt Orderer(const T& left, const T& right);
+
+    template <class T>
+	friend TInt OrdererWithPriority(const T& left, const T& right);
+    };
+/** 
+*  @function Orderer
+*  @since S60 3.2
+*  template function used to compare between two objects
+*  @param left 	- template object
+*		  right	- template object
+*  @return 0 if both are same, +ve or -ve Values as per Comparision
+*/ 	
+template <class T>
+TInt Orderer(const T& left, const T& right) 
+    {
+    //return left.GetName().CompareC(right.GetName());
+    return (left.iName)->CompareF(*right.iName);
+	}
+
+template <class T>
+TInt OrdererWithPriority(const T& left, const T& right) 
+    {
+    if (left.iPriority < right.iPriority)
+    	{
+    	return -1;
+    	}
+    else if (left.iPriority == right.iPriority)
+    	{
+        return (left.iName)->CompareF(*right.iName);
+    	}
+    else
+    	{
+    	return 1;
+    	}
+	}
+
+    
+#endif /* INC_CSXHHELPCONTENTBASE_H_HEADER_INCLUDED_BC0553D0 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHHelpDataBase.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,272 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHHelpDataBase class declaration
+*
+*/
+
+
+#ifndef INC_CSXHHELPDATABASE_H_HEADER_INCLUDED_BC054F58
+#define INC_CSXHHELPDATABASE_H_HEADER_INCLUDED_BC054F58
+
+#include "CSXHHelpContentBase.h"
+#include "CSXHGenericTOC1.h"
+#include <f32file.h>
+#include <apadef.h>
+class 	CAknProgressDialog;
+
+class CCSXHHelpDataBase;
+class CCSXHHTMLContentParser;
+class CCSXHLegacyContentParser;
+class CCSXHGenericTOC2;
+class CCSXHKywdTOC1;
+class CCSXHHtmlTOC1;
+class CCoeEnv;
+class CCSXHMainTopics;
+class CCSXHKywdTopics;
+class MCSXHKywdBuilder;
+
+/** 
+* @class CCSXHHelpDataBase
+* This class has all pointers & used to generate the required data from Application
+*/
+class CCSXHHelpDataBase : public CBase
+    {
+  public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHHelpDataBase 
+*  and return a pointer to the created object
+*  @param aCoeEnv 	- Control Environment
+*  @return a CCSXHHelpDataBase Pointer 
+*/
+    IMPORT_C static CCSXHHelpDataBase* NewL(CCoeEnv* aCoeEnv,const TApaAppCaption& aAppCaption, const TApaAppCaption& aAppHelpTopic);
+/** 
+*  @function NewLC
+*  @since S60 3.2
+*  Construct a CCSXHHelpDataBase 
+*  and return a pointer to the created object using two phase construction
+*  @param aCoeEnv 	- Control Environment
+*  @return a CCSXHHelpDataBase Pointer 
+*/
+    static CCSXHHelpDataBase* NewLC(CCoeEnv *aCoeEnv,const TApaAppCaption& aAppCaption, const TApaAppCaption& aAppHelpTopic);
+
+/** 
+*  @function GetInstance
+*  @since S60 3.2
+*  Get the instance of database class
+*  @return database pointer 
+*/
+    static CCSXHHelpDataBase* GetInstance();
+
+ /** 
+ * @function ~CCSXHHelpDataBase
+ * @since S60 3.2
+ * Destroy the object and release all memory objects
+ */ 
+    IMPORT_C ~CCSXHHelpDataBase();
+/** 
+*  @function GetMainTopics
+*  @since S60 3.2
+*  Get the instance of Main toc1
+*  @return toc1 pointer 
+*/  
+    IMPORT_C CCSXHGenericTOC1* GetMainTopics();
+/** 
+*  @function GetKywdTopics
+*  @since S60 3.2
+*  Get the instance of keyword toc1
+*  @return toc1 pointer 
+*/  
+    IMPORT_C CCSXHGenericTOC1* GetKywdTopics();
+/** 
+*  @function GetAppHelpsTopics
+*  @since S60 5.2
+*  Get the instance of application (custom) helps toc1
+*  @return toc1 pointer 
+*/  
+    IMPORT_C CCSXHGenericTOC1* GetAppHelpsTopics();
+/** 
+*  @function ClearAllTOC1Contents
+*  @since S60 3.2
+*  Delete all the objects from the Array
+*/   
+    IMPORT_C void ClearAllTOC1Contents();
+/** 
+*  @function GetContextTopic
+*  @since S60 3.2
+*  Delete all the objects from the Array
+*  @param aContextMessage - Message Sent by other Application
+*  @return Database pointer 
+*/ 	
+	IMPORT_C CCSXHHelpContentBase* GetContextTopic(const TDesC8& aContextMessage);
+/** 
+*  @function GetHtmlTopicForUrlL
+*  @since S60 3.2
+*  Delete all the objects from the Array
+*  @param aurl - Html file path
+*  @return Database pointer 
+*/ 	
+	IMPORT_C CCSXHHelpContentBase* GetHtmlTopicForUrlL(const TDesC& aurl);
+	
+/** 
+*  @function IncrementProgressBar
+*  @since S60 3.2
+*  Increments the progress info 
+*  @return progress info pointer
+*/ 	
+	void IncrementKeywordSearchCount(TInt aUnits = 1);
+/** 
+*  @function GetLegacyParser
+*  @since S60 3.2
+*  Get LegacyContentparser
+*  @return LegacyContentParser pointer 
+*/	
+	CCSXHLegacyContentParser* GetLegacyParser();
+/** 
+*  @function GetHtmlParser
+*  @since S60 3.2
+*  Get htmlContentparser
+*  @return HtmlContentParser pointer 
+*/	
+	CCSXHHTMLContentParser* GetHtmlParser();
+/** 
+*  @function InsertKeywordL
+*  @since S60 3.2
+*  Insert into array
+*  @param aKywdName - Keyword Name
+*		  aToc1		- Toc1 Object
+*/	
+	void InsertKeywordL(const TDesC& aKywdName, CCSXHHtmlTOC1* aToc1);
+/** 
+*  @function InsertKeywordL
+*  @since S60 3.2
+*  Insert into Array
+*  @param aKywdName 		- Keyword Name
+*		  aLegacyKywdIndex	- Position 
+*		  aCatUid			- Application Uid
+*/	
+	void InsertKeywordL(const TDesC& aKywdName, TInt aLegacyKywdIndex, const TUid& aCatUid);
+
+
+/** 
+*  @function InitGenerateKeywordTOC2ListL
+*  @since S60 3.2
+*  Initializes the generation of kywd toc2 objects
+*  @param aKywdToc1 		- Keyword toc1 object
+*/	
+	IMPORT_C TInt InitGenerateKeywordTOC2ListL(CCSXHKywdTOC1* aKywdToc1);
+
+/** 
+*  @function GenerateKeywordTOC2ListL
+*  @since S60 3.2
+*  Generate the toc2 objects,InitGenerateKeywordTOC2ListL has to be called first
+*  @param aKywdToc1 		- Keyword toc1 object
+*/	
+	void GenerateKeywordTOC2ListL(CCSXHKywdTOC1* aKywdToc1);
+
+/** 
+*  @function InsertKeywordTopicL
+*  @since S60 3.2
+*  The caller should allocate memory for the aTOC2 object, if it is not successfully 
+*  added to the topic, then this function will free the memory
+*  @param 
+*  		  aToc2		- toc2 object
+*/	
+	CCSXHKywdTOC1* InsertKeywordTopicL(CCSXHGenericTOC2* aToc2);
+	
+/** 
+*  @function InsertKeywordTopic
+*  @since S60 3.2
+*  The caller should allocate memory for the aTOC2 object, if it is not successfully 
+*  added to the topic, then this function will free the memory
+*  @param aToc1 - toc1 object
+*  		  aToc2	- toc2 object
+*/	
+	void InsertKeywordTopic(CCSXHKywdTOC1* aToc1, CCSXHGenericTOC2* aToc2);
+
+/** 
+*  @function FillKeywordTopicsL
+*  @since S60 3.2
+*  Fills Keyword objects
+*  @param aBuilder - MCSXHKywdBuilder object
+*/	
+	void FillKeywordTopicsL(MCSXHKywdBuilder* aBuilder);
+
+/** 
+*  @function GetCoeEnv
+*  @since S60 3.2
+*  Get the Control Environment
+*  @return pointer to control environment
+*/
+	CCoeEnv* GetCoeEnv();
+/** 
+*  @function GetKeywordSearchCount
+*  @since S60 3.2
+*  Gets the current count of keywords for search result view
+*  @return TInt count
+*/
+IMPORT_C	TInt GetKeywordSearchCount();
+	
+  private:
+/** 
+*  @function ConstructL
+*  @since S60 3.2
+*  perform the second phase construction
+*/
+    void ConstructL();
+/** 
+*  @function CCSXHHelpDataBase
+*  @since S60 3.2
+*  Construct a CCSXHHelpDataBase
+*  @param aCoeEnv  - Control Environment
+*/
+    CCSXHHelpDataBase(CCoeEnv* aCoeEnv,const TApaAppCaption& aAppCaption, const TApaAppCaption& aAppHelpTopic);
+
+/** 
+*  @function GetContextTopicL
+*  @since S60 3.2
+*  Get the topic for the Context
+*  @param aContextMessage  - Message sent by other Application
+*  @return Database pointer	
+*/    
+    CCSXHHelpContentBase* GetContextTopicL(const TDesC8& aContextMessage);
+    
+    // List of TOC1 entries
+    CCSXHMainTopics *iMainTOC1;
+    // List of keyword entries
+    CCSXHKywdTopics *iKywdTOC1;
+    
+    CCSXHMainTopics* iAppHelpsToc;
+    
+    
+    CCSXHHTMLContentParser *iHTMLContentParser;
+    CCSXHLegacyContentParser *iLegacyContentParser;
+    
+	CCoeEnv *iCoeEnv;
+	
+	CCSXHHelpContentBase *iLastContextTopic;
+	
+	MCSXHKywdBuilder *iKwydBuilder;
+	
+	TApaAppCaption iAppCaption;
+	
+	TApaAppCaption  iAppHelpTopic;
+	TInt iKeywordSearchCount;
+	
+    };
+
+
+
+#endif /* INC_CSXHHELPDATABASE_H_HEADER_INCLUDED_BC054F58 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHHtmlTOC1.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,148 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHHtmlTOC1 class declaration
+*
+*/
+
+
+#ifndef INC_CSXHHTMLTOC1_H_HEADER_INCLUDED_BC0568C5
+#define INC_CSXHHTMLTOC1_H_HEADER_INCLUDED_BC0568C5
+
+#include "CSXHGenericTOC1.h"
+
+class CCSXHHelpDataBase;
+
+/** 
+* @class TAppUid
+* This class stores the required information to store a folder name in string
+* as integer and converts it back to a string when required. This class is mainly
+* to save RAM space 
+*/
+
+class TAppUid
+ 	{
+   	public:
+   		TAppUid(const TDesC& aFolder);
+   		const TUid& GetUid() const;
+   		TBool IsValid() const;
+    	void AppendUid(TBuf<KMaxFileName>& aStr) const;	
+   	private:
+   		TUid iUid;
+   		TUint8 iLength;
+    	};
+    	
+
+/** 
+* @class CCSXHHtmlTOC1
+* This class has the information of html TOC1 
+*/
+class CCSXHHtmlTOC1 : public CCSXHGenericTOC1
+    {
+    public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHHtmlTOC1 
+*  and return a pointer to the created object
+*  @param aName 	- TOC1 Name
+*		  aUid 		- Application Uid
+*		  aDrive    - Drive Number
+*  @return a CCSXHHtmlTOC1 Pointer 
+*/
+    static CCSXHHtmlTOC1* NewL(const TDesC& aName,const TDesC& aFolder,
+    							const TInt& aDrive, TUid aViewId, TInt32 aPriority = 0);
+/** 
+ * @function ~CCSXHHtmlTOC1
+ * @since S60 3.2
+ * Destroy the object and release all memory objects
+ */    							
+    ~CCSXHHtmlTOC1();
+
+/** 
+*  @function GetViewID
+*  @since S60 3.2
+*  Get ViewId to activate the View
+*  @return View Id
+*/    
+    TUid GetViewID() const;
+
+/** 
+*  @function GetAppUid
+*  @since S60 3.2
+*  Get Application  uid
+*  @return Application UId
+*/    
+    const TUid& GetAppUid() const;
+/** 
+*  @function GetContextTopic
+*  @since S60 3.2
+*  Get content for Context Name
+*  @param  acontextName - Context Name 
+*  @return pointer to database class
+*/     
+    CCSXHHelpContentBase* GetContextTopic(const TDesC& acontextName);
+/** 
+*  @function GetHelpFileL
+*  @since S60 3.2
+*  Get the file path
+*  @param  aFilePath - File Path
+*/     
+    void GetHelpFileL(TBuf<KMaxFileName>& aFilePath) const;
+/** 
+*  @function GetHtmlTopicForFile
+*  @since S60 3.2
+*  Get the toc2 object in order to get Content
+*  @param  aFile - toc2 Name
+*/     
+    CCSXHHelpContentBase* GetHtmlTopicForFile(const TDesC& aFile);
+    
+/** 
+*  @function GetHelpFileL
+*  @since S60 3.2
+*  Get the file path
+*  @return  ETrue, if it part of ROMdrive, EFalse otherwise
+*/     
+    TBool IsROMDrive();
+    
+    TBool IsValid() const;
+    
+    protected:
+/** 
+*  @function CCSXHHtmlTOC1
+*  @since S60 3.2
+*  Construct a CCSXHHtmlTOC1 
+*  @param aName 	- TOC1 Name
+*		  aUid 		- Application Uid
+*		  aDrive    - Drive Number
+*/    
+    CCSXHHtmlTOC1(const TDesC& aName, const TDesC& aFolder, const TInt& aDriveName, TUid aViewId, TInt32 aPriority);
+/** 
+*  @function InitChildList
+*  @since S60 3.2
+*  Allocate Memory to the array
+*/    
+    void InitChildList();
+    
+    
+    private:	
+    
+	  
+     TAppUid iAppUid;
+      short iDrive;
+    TUid iViewId;
+    };
+
+
+
+#endif /* INC_CSXHHTMLTOC1_H_HEADER_INCLUDED_BC0568C5 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHHtmlTOC2.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,172 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHHtmlTOC2 class declaration
+*
+*/
+
+
+#ifndef INC_CSXHHTMLTOC2_H_HEADER_INCLUDED_BC052432
+#define INC_CSXHHTMLTOC2_H_HEADER_INCLUDED_BC052432
+
+#include "CSXHGenericTOC2.h"
+
+class CCSXHGenericTOC1;
+class CCSXHKywdTOC1;
+class CCoeEnv;
+class TCoeHelpContext;
+class RFeatureControl;
+/** 
+* @class CCSXHHtmlTOC2
+* This class has the information of html TOC2 
+*/
+class CCSXHHtmlTOC2 : public CCSXHGenericTOC2
+    {
+    public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHHtmlTOC2 
+*  and return a pointer to the created object
+*  @param aparent 	- TOC1 object
+*		  aName  	- toc2 Name
+*		  aHtmlFileName - FileName
+*		  aKey		    - ETrue for Keyword toc2, EFalse otherwise	
+*  @return a CCSXHHtmlTOC2 Pointer 
+*/
+static CCSXHHtmlTOC2* NewL(CCSXHGenericTOC1* aparent,const TDesC& aName,
+const TDesC& aHtmlFileName,TBool aKey=EFalse);
+/** 
+*  @function NewLC
+*  @since S60 3.2
+*  Construct a CCSXHHtmlTOC2 
+*  and return a pointer to the created object using two phase construction
+*  @param aparent 	- TOC1 object
+*		  aName  	- toc2 Name
+*		  aHtmlFileName - FileName
+*		  aKey		    - ETrue for Keyword toc2, EFalse otherwise	
+*  @return a CCSXHHtmlTOC2 Pointer 
+*/
+static CCSXHHtmlTOC2* NewLC(CCSXHGenericTOC1*aparent,const TDesC& aName,
+const TDesC& aHtmlFileName,TBool aKey=EFalse);
+
+/** 
+ * @function ~CCSXHHtmlTOC2
+ * @since S60 3.2
+ * Destroy the object and release all memory objects
+ */    
+    ~CCSXHHtmlTOC2();
+
+/** 
+ * @function ~CCSXHHtmlTOC2
+ * @since S60 3.2
+ * Get the full path of the HTML file
+ * @param aFileUrl - Buffer in order to get the file path	
+ */    
+    IMPORT_C void GetHtmlUrlL(TBuf<KMaxFileName>& aFileUrl) const;
+
+/** 
+*  @function GetViewID
+*  @since S60 3.2
+*  Get ViewId to activate the View
+*  @return View Id
+*/    
+    TUid GetViewID() const;
+/** 
+*  @function GetTopicContentL
+*  @since S60 3.2
+*  Get the content to display in the browser 
+*  @return Pointer to the buffer
+*/   
+    TAny* GetTopicContentL();
+       	
+/** 
+*  @function GetFileName
+*  @since S60 3.2
+*  Get html file Name
+*  @return buffer which contains html file Name
+*/
+    const TBuf<KMaxFileName>& GetFileName() const;
+    
+/** 
+*  @function GetHelpContext
+*  @since S60 3.2
+*  Constructs a Help Context corresponding to the topic
+*  @returns true on success
+*/
+    IMPORT_C TBool GetHelpContext(TCoeHelpContext& aContext) const;
+
+/** 
+*  @function GetContentsFromUrlL
+*  @since S60 3.2
+*  Get content from a html file
+*  @param aUrl    - Full file path
+*		  aCoeEnv - Control Environment
+*  @return pointer to buffer which contains HTML file content
+*/
+    IMPORT_C static HBufC8* GetContentsFromUrlL(const TDesC& aUrl,
+    				CCoeEnv* aCoeEnv,RFeatureControl& aFeatureControl);
+   
+/** 
+*  @function SetKywdParent
+*  @since S60 3.2
+*  Set the parent object
+*  @param aParent    - keyword toc1 class pointer
+*/ 
+    void SetKywdParent(CCSXHKywdTOC1* aParent);
+/** 
+*  @function GetKywdParent
+*  @since S60 3.2
+*  Get the parent 
+*  @return poniter to keywordtoc1 (parent) class
+*/
+    IMPORT_C  CCSXHKywdTOC1* GetKywdParent();
+
+/** 
+*  @function SetHtmlFilePath
+*  @since S60 3.2
+*  Set Html file path
+*  @param aFilePath - Html file path
+*/
+    void SetHtmlFilePath(const TDesC&  aFilePath);
+    
+/** 
+*  @function GetHtmlFileName
+*  @since S60 3.2
+*  Get html file
+*  @param aFileName - Full path with html file name 
+*/
+    void GetHtmlFileName(TBuf<KMaxFileName>&  aFileName);	
+
+	private:
+/** 
+*  @function CCSXHHtmlTOC2
+*  @since S60 3.2
+*  Construct a CCSXHHtmlTOC2 
+*  @param aparent 	- TOC1 object
+*		  aName  	- toc2 Name
+*		  aHtmlFileName - FileName
+*		  aKey		    - ETrue for Keyword toc2, EFalse otherwise	
+*/	
+		CCSXHHtmlTOC2(CCSXHGenericTOC1* aparent,const TDesC& aName,
+		const TDesC& aHtmlFileName,TBool aKeyWord = false);
+	
+	private:
+    	TBuf<KMaxFileName> iHTMLFileName,iHTMLFilePath;
+    	TBool iKeyWordTopic;
+    	CCSXHKywdTOC1 *iKywdParent;    	
+    };
+
+
+
+#endif /* INC_CSXHHTMLTOC2_H_HEADER_INCLUDED_BC052432 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHKywdTOC1.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHKywdTOC1 class declaration
+*
+*/
+
+
+#ifndef INC_CSXHKYWDTOC1_H_HEADER_INCLUDED_BC0568C5
+#define INC_CSXHKYWDTOC1_H_HEADER_INCLUDED_BC0568C5
+
+#include "CSXHGenericTOC1.h"
+
+class CCSXHHtmlTOC1;
+/** 
+* @class CCSXHLegacyTOC1
+* This class has the information of keyword TOC1 
+*/
+class CCSXHKywdTOC1 : public CCSXHGenericTOC1
+    {
+    public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHKywdTOC1 
+*  and return a pointer to the created object
+*  @param aName 	- Name of the TOC1
+*  @return a CCSXHKywdTOC1 Pointer 
+*/     
+	    static CCSXHKywdTOC1* NewL(const TDesC& aName);
+/** 
+*  @function NewLC
+*  @since S60 3.2
+*  Construct a CCSXHKywdTOC1 
+*  and return a pointer to the created object using two phase contruction
+*  @param aName 	- Name of the TOC1
+*  @return a CCSXHKywdTOC1 Pointer 
+*/  	    
+    	static CCSXHKywdTOC1* NewLC(const TDesC& aName);
+/** 
+ * @function ~CCSXHKywdTOC1
+ * @since S60 3.2
+ * Destroy the object and release all memory objects
+ */     	
+  		~CCSXHKywdTOC1();
+/** 
+*  @function GetViewID
+*  @since S60 3.2
+*  Get ViewId to activate the View
+*  @return View Id
+*/
+	    TUid GetViewID() const;
+/** 
+*  @function LegacyIndex
+*  @since S60 3.2
+*  Get the position
+*  @return position
+*/	    
+	    TInt& LegacyIndex();
+/** 
+*  @function AppendHtmlTOC1L
+*  @since S60 3.2
+*  Insert html toc1 object
+*  @param atoc1 - html toc1 class pointer
+*/	    
+	    void AppendHtmlTOC1L(CCSXHHtmlTOC1* aToc1);
+
+/** 
+*  @function GetHtmlTOC1List
+*  @since S60 3.2
+*  Get the Array
+*  @return pointer to the Array of html toc1 objects
+*/	    
+	    RPointerArray<CCSXHHtmlTOC1>* GetHtmlTOC1List(); 
+  	
+    protected:
+/** 
+*  @function CCSXHKywdTOC1
+*  @since S60 3.2
+*  Construct a CCSXHKywdTOC1
+*  @param aName  - kywd toc1 name
+*/     
+    	CCSXHKywdTOC1(const TDesC& aName);
+/** 
+*  @function InitChildList
+*  @since S60 3.2
+*  Allocate Memory for toc1htmllist array
+*/     
+       	void InitChildList();	
+  	private:	
+       	TInt iLegacyIndex;//Needed for getting the TOC2 kywd legacy contents
+		RPointerArray<CCSXHHtmlTOC1> *iTOC1HtmlList; //Needed for getting the TOC2 kywd HTML contents
+     	
+    };
+    
+ 
+    
+#endif /* INC_CSXHKYWDTOC1_H_HEADER_INCLUDED_BC0568C5 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHKywdTopics.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,150 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHKywdTopics class declaration
+*
+*/
+
+
+#ifndef INC_CSXHKYWDTOPICS_H_HEADER_INCLUDED_BC0568C5
+#define INC_CSXHKYWDTOPICS_H_HEADER_INCLUDED_BC0568C5
+
+#include "CSXHGenericTOC1.h"
+#include <apadef.h>
+
+class CCSXHHelpDataBase;
+class CCSXHHtmlTOC1;
+class CCSXHKywdTOC1;
+
+/** 
+* @class CCSXHKywdTopics
+* This class has the information of Keyword Objects
+*/
+class CCSXHKywdTopics : public CCSXHGenericTOC1
+    {
+    public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHKywdTopics 
+*  and return a pointer to the created object
+*  @param aDataBase - database class pointer
+*  @return a CCSXHKywdTopics Pointer 
+*/      
+    static CCSXHKywdTopics* NewL(const TApaAppCaption& aAppCaption);
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHKywdTopics 
+*  and return a pointer to the created object using two phase construction
+*  @param aDataBase - database class pointer
+*  @return a CCSXHKywdTopics Pointer 
+*/      
+    static CCSXHKywdTopics* NewLC(const TApaAppCaption& aAppCaption);
+/** 
+*  @function ~CCSXHKywdTopics
+*  @since S60 3.2
+*  Destroy the object and release all memory objects
+*/
+    ~CCSXHKywdTopics();
+/** 
+*  @function GetViewID
+*  @since S60 3.2
+*  Get ViewId to activate the View
+*  @return View Id
+*/    
+    TUid GetViewID() const;
+/** 
+*  @function InsertKywdL
+*  @since S60 3.2
+*  Insert into an array
+*  @param aKywd	- Keyword Name
+*/   
+    void InsertKywdL(const TDesC& aKywd);
+/** 
+*  @function GetChildL
+*  @since S60 3.2
+*  Get objects for keyword
+*  @param aKywd	- Keyword Name
+*  @return database class pointer
+*/   
+    CCSXHHelpContentBase* GetChildL(const TDesC& aName);
+    
+/** 
+*  @function GetSelectedTopic
+*  @since S60 3.2
+*  Get the pointer for a selected Keyword
+*  @return keyword toc1 class pointer
+*/   
+    CCSXHKywdTOC1* GetSelectedTopic();
+    
+    protected:
+/** 
+*  @function CCSXHKywdTopics
+*  @since S60 3.2
+*  Construct a CCSXHKywdTopics
+*  @param aName - keyword Name  
+*/     
+    	CCSXHKywdTopics(const TDesC& aName);
+    	
+/** 
+*  @function InitChildList
+*  @since S60 3.2
+*  Allocate Memory for the Array 
+*/   
+    	void InitChildList() {}
+/** 
+*  @function CopyChildListL
+*  @since S60 3.2
+*  Copies content to Descriptor Array
+*  @param aArray - Descriptor Array
+*/   
+  		void CopyChildListL(CDesCArray* aArray);
+  		
+  	private:
+  		CDesCArray *iKywdTopics;
+  		CCSXHKywdTOC1 *iCurrentTopic;
+    };
+
+
+
+/** 
+* @class MCSXHKywdBuilder
+* The HTML content parser operates on this class for inserting keywords
+*/
+class MCSXHKywdBuilder
+    {
+    public: // New functions
+/** 
+*  @function InsertKeywordL
+*  @since S60 3.2
+*  Insert keywords into an array, pure virtual function
+*  @param aKwdTopics - keyword topics class pointer
+*		  aKwd		 - keyword Name
+*		  aToc1		 - html toc1 class pointer
+*/ 
+     virtual void InsertKeywordL(CCSXHKywdTopics* aKwdTopics, const TDesC& aKwd, 
+    									CCSXHHtmlTOC1* aToc1) = 0; 
+/** 
+*  @function InsertKeywordL
+*  @since S60 3.2
+*  Insert keywords into an array, pure virtual function
+*  @param aKwdTopics   - keyword topics class pointer
+*		  aKwd		   - keyword Name
+*		  aLegacyIndex - position of the object
+*/     
+     virtual void InsertKeywordL(CCSXHKywdTopics* aKwdTopics, const TDesC& aKwd, 
+    									const TInt& aLegacyIndex) = 0; 
+    };
+
+#endif /* INC_CSXHKYWDTOPICS_H_HEADER_INCLUDED_BC0568C5 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHLegacyContentParser.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,179 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHLegacyContentParser class declaration
+*
+*/
+
+
+#ifndef __CCSXHLEGACYCONTENTPARSER_H__
+#define __CCSXHLEGACYCONTENTPARSER_H__
+
+#include <e32base.h>
+#include <hlpmodel.h>
+
+class CHlpModel;
+class CHlpTopic;
+class CCSXHGenericTOC1;
+class CCSXHGenericTOC2;
+class CCSXHLegacyTOC2;
+class CCSXHHelpDataBase;
+class CCSXHKywdTOC1;
+class CCSXHLegacyTOC1;
+class CCoeEnv;
+class CCSXHHelpContentBase;
+class TCoeHelpContext;
+
+/**
+*  CCSXHLegacyContentParser class.
+*  This class is used to retrive Legacy content from .hlp file
+*  @lib euser.lib
+*  @since 3.2
+*/
+
+class CCSXHLegacyContentParser: public CBase , public MHlpModelObserver
+	{
+	public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHLegacyContentParser 
+*  and return a pointer to the created object
+*  @param aDataBase 	- Database class Pointer
+*  @return a CCSXHLegacyContentParser Pointer 
+*/  
+		static CCSXHLegacyContentParser* NewL(CCSXHHelpDataBase* aDataBase);
+/** 
+*  @function NewLC
+*  @since S60 3.2
+*  Construct a CCSXHLegacyContentParser 
+*  and return a pointer to the created object using two phase construction
+*  @param aDataBase 	- Database class pointer
+*  @return a CCSXHLegacyContentParser Pointer 
+*/
+		static CCSXHLegacyContentParser* NewLC(CCSXHHelpDataBase* aDataBase);
+			
+/** 
+*  @function GenerateTOC1ListL
+*  @since S60 3.2
+*  Generate Legacy TOC1 Objects 
+*  @param aDataBase 	- Database class pointer
+*/
+		void GenerateTOC1ListL(CCSXHHelpDataBase* aDataBase);
+/** 
+*  @function GenerateTOC2ListL
+*  @since S60 3.2
+*  Generate Legacy TOC2 Objects 
+*  @param atoc1 	- generic toc1 class pointer
+*		  aArray	- Database class pointer's array pointer 
+*/
+		void GenerateTOC2ListL(CCSXHGenericTOC1& atoc1,RPointerArray<CCSXHHelpContentBase>* aArray);
+/** 
+*  @function GetTopicContentL
+*  @since S60 3.2
+*  Get the richtext for a selected toc2  
+*  @param atoc2 	- generic toc2 class pointer
+*  @return richtext pointer
+*/		
+		TAny* GetTopicContentL(CCSXHGenericTOC2* atoc2);
+/** 
+*  @function GenerateKywdTOC1ListL
+*  @since S60 3.2
+*  Generate Legacy Keyword TOC1 Objects 
+*  @param aDataBase 	- Database class pointer
+*/		
+		void GenerateKywdTOC1ListL(CCSXHHelpDataBase *aDataBase);
+
+/** 
+*  @function InitGenerateTOC2ListForKeywordSearchL
+*  @since S60 3.2
+*  Generate Legacy Keyword TOC2 Objects 
+*  @param akywdtoc1	- keyword toc1 class pointer
+*  @return TInt the number of keyword sub topics
+*/
+	TInt InitGenerateTOC2ListForKeywordSearchL(CCSXHKywdTOC1* akywdtoc1);
+
+/** 
+*  @function GenerateTOC2ListForKeywordSearchL
+*  @since S60 3.2
+*  Generate Legacy Keyword TOC2 Objects,InitGenerateTOC2ListForKeywordSearchL
+*  has to be called first
+*  @param akywdtoc1	- keyword toc1 class pointer
+*/
+		void GenerateTOC2ListForKeywordSearchL(CCSXHKywdTOC1* akywdtoc1);
+/** 
+*  @function GetTOC1ForTOC2
+*  @since S60 3.2
+*  Get Legacy TOC1 Object 
+*  @param atoc2	- keyword toc2 class pointer
+*  @return legacy toc1 class pointer
+*/
+		CCSXHLegacyTOC1* GetTOC1ForTOC2(CCSXHLegacyTOC2* atoc2);
+/** 
+ * @function ~CCSXHLegacyContentParser
+ * @since S60 3.2
+ * Destroy the object and release all memory objects
+ */  		
+		~CCSXHLegacyContentParser();
+
+/** 
+*  @function GetContextTopic
+*  @since S60 3.2
+*  Get the help Context object
+*  @param aContext - Help context object
+*  @param database class pointer 
+*/         
+		CCSXHHelpContentBase* GetContextTopic(TCoeHelpContext &aContext);
+		
+	private:
+/** 
+*  @function CCSXHLegacyContentParser
+*  @since S60 3.2
+*  Construct a CCSXHLegacyContentParser
+*  @param aDataBase  - Database class pointer
+*/ 	
+		CCSXHLegacyContentParser(CCSXHHelpDataBase *aDataBase);
+/** 
+*  @function ConstructL
+*  @since S60 3.2
+*  perform the second phase construction
+*  @param aDataBase  - Database class pointer
+*/ 		
+		void ConstructL();
+/** 
+*  From MHlpModelObserver class	
+*  @function HandleModelEventL
+*  @since S60 3.2
+*  handle event from CHlpModel
+*  @param aEvent from CHlpModel
+*/ 		
+		void HandleModelEventL(TInt aEvent);
+/** 
+*  @function LoadContextTopicL
+*  @since S60 3.2
+*  Get the Richtext for context sensitive help
+*  @param aContext Help context class object
+*/ 		
+		void LoadContextTopicL(TCoeHelpContext &aContext);
+	
+	private:
+		CHlpModel* iModel;
+		CHlpTopic* iTopic;
+		CCSXHHelpDataBase* iDataBase;
+		CHlpList* iHlpList; 
+		TInt iStatus;
+		//Store all the created Legacy TOC1 objects for future reference.
+		RPointerArray<CCSXHLegacyTOC1> iLegacyTOC1List;
+	};
+
+#endif 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHLegacyTOC1.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHLegacyTOC1 class declaration
+*
+*/
+
+
+#ifndef INC_CSXHLEGACYTOC1_H_HEADER_INCLUDED_BC050894
+#define INC_CSXHLEGACYTOC1_H_HEADER_INCLUDED_BC050894
+
+#include "CSXHGenericTOC1.h"
+
+class CCSXHGenericContentParser;
+class CCSXHHelpDataBase;
+/** 
+* @class CCSXHLegacyTOC1
+* This class has the information of Legacy TOC1 
+*/
+class CCSXHLegacyTOC1 : public CCSXHGenericTOC1
+    {
+    public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHLegacyTOC1 
+*  and return a pointer to the created object
+*  @param aName 	- Name of the TOC1
+*  @return a CCSXHLegacyTOC1 Pointer 
+*/    
+    static CCSXHLegacyTOC1* NewL(const TDesC& aName);
+    
+/** 
+*  @function NewLC
+*  @since S60 3.2
+*  Construct a CCSXHLegacyTOC1 
+*  and return a pointer to the created object using two phase contruction
+*  @param aName 	- Name of the TOC1
+*  @return a CCSXHLegacyTOC1 Pointer 
+*/      
+    static CCSXHLegacyTOC1* NewLC(const TDesC& aName);
+     
+/** 
+*  @function GetViewID
+*  @since S60 3.2
+*  Get ViewId to activate the View
+*  @return View Id
+*/ 
+    TUid GetViewID() const;
+    
+/** 
+*  @function GetContextTopic
+*  @since S60 3.2
+*  Get toc2 Object 
+*  @return CCSXHHelpContentBase (Leagcytoc2) class Pointer
+*/  
+    CCSXHHelpContentBase* GetContextTopic(const TDesC &aContextName);
+
+    private: 	
+/** 
+*  @function CCSXHLegacyTOC1
+*  @since S60 3.2
+*  Construct a CCSXHLegacyTOC1 
+*/    
+    	CCSXHLegacyTOC1(const TDesC& aName);
+
+/** 
+*  @function InitChildList
+*  @since S60 3.2
+*  Allocates Memory in order to store Objects
+*/    
+    	void InitChildList();
+    
+    };
+
+
+
+#endif /* INC_CSXHLEGACYTOC1_H_HEADER_INCLUDED_BC050894 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHLegacyTOC2.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,100 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHLegacyTOC2 class declaration
+*
+*/
+
+
+#ifndef INC_CSXHLEGACYTOC2_H_HEADER_INCLUDED_BC0535B9
+#define INC_CSXHLEGACYTOC2_H_HEADER_INCLUDED_BC0535B9
+
+#include "CSXHGenericTOC2.h"
+
+class CCSXHGenericTOC1;
+class CCSXHLegacyTOC1;
+/** 
+* @class CCSXHLegacyTOC2
+* This class has the information of Legacy TOC2 Info
+*/
+class CCSXHLegacyTOC2 : public CCSXHGenericTOC2
+    {
+    public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHLegacyTOC2 
+*  and return a pointer to the created object
+*  @param aParent   - TOC1 Object
+*		  aName 	- Name of the TOC2 
+*		  aKey  	- ETrue for KeywordTopic, EFalse otherwise
+*  @return a CCSXHLegacyTOC2 Pointer 
+*/ 
+    static CCSXHLegacyTOC2* NewL(CCSXHGenericTOC1 *aParent,const TDesC&
+    aName,TBool aKey=EFalse);
+
+/** 
+*  @function NewLC
+*  @since S60 3.2
+*  Construct a CCSXHLegacyTOC2 
+*  and return a pointer to the created object using two phase constuction
+*  @param aParent   - TOC1 Object
+*		  aName 	- Name of the TOC2 
+*		  aKey  	- ETrue for KeywordTopic, EFalse otherwise
+*  @return a CCSXHLegacyTOC2 Pointer 
+*/     
+    static CCSXHLegacyTOC2* NewLC(CCSXHGenericTOC1 *aParent,const TDesC& 
+    aName,TBool aKey=EFalse);
+
+/** 
+*  @function GetTopicContentL
+*  @since S60 3.2
+*  Get the topic to be displayed in Richtext format
+*  @return RichText Pointer
+*/    
+    IMPORT_C TAny* GetTopicContentL();
+
+/** 
+*  @function GetViewID
+*  @since S60 3.2
+*  Get ViewId to activate the View
+*  @return View Id
+*/       	
+    TUid GetViewID() const;
+    
+/** 
+*  @function GetLegacyParent
+*  @since S60 3.2
+*  Get Parent Object
+*  @return TOC1 Object(Parent) for present TOC2 Object
+*/    
+    IMPORT_C  CCSXHLegacyTOC1* GetLegacyParent();
+		
+	private:
+/** 
+*  @function CCSXHLegacyTOC2
+*  @since S60 3.2
+*  Construct a CCSXHLegacyTOC2 
+*  @param aRect - TRect Object
+*  @param aParent   - TOC1 Object
+*		  aName 	- Name of the TOC2 
+*		  aKey  	- ETrue for KeywordTopic, EFalse otherwise
+*/	
+		CCSXHLegacyTOC2(CCSXHGenericTOC1 *aParent, const TDesC& aName,TBool aKey);
+		
+		TBool iKeyWordTopic;
+  };
+
+
+
+#endif /* INC_CSXHLEGACYTOC2_H_HEADER_INCLUDED_BC0535B9 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHMainTopics.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHMainTopics class declaration
+*
+*/
+
+
+#ifndef INC_CSXHMAINTOPICS_H_HEADER_INCLUDED_BC0568C5
+#define INC_CSXHMAINTOPICS_H_HEADER_INCLUDED_BC0568C5
+
+#include "CSXHGenericTOC1.h"
+#include <apadef.h>
+
+class CCSXHHelpDataBase;
+/** 
+* @class CCSXHMainTopics
+* This class has info of TOC1 Objects
+*/
+class CCSXHMainTopics : public CCSXHGenericTOC1
+    {
+    public:
+/** 
+*  @function CCSXHMainTopics
+*  @since S60 3.2
+*  Construct a CCSXHMainTopics 
+*  @param aCoeEnv 	- Control Environment 
+*  @retrun a CCSXHMainTopics pointer
+*/
+    static CCSXHMainTopics* NewL(const TUid&, const TApaAppCaption& aAppCaption, const TInt32 aPriority = 0);
+/** 
+*  @function CCSXHMainTopics
+*  @since S60 3.2
+*  Construct a CCSXHMainTopics using two phase construction
+*  @param aCoeEnv 	- Control Environment 
+*  @retrun a CCSXHMainTopics pointer
+*/  
+    static CCSXHMainTopics* NewLC(const TUid&,const TApaAppCaption& aAppCaption, const TInt32 aPriority = 0);
+    
+/** 
+ * @function ~CCSXHMainTopics
+ * @since S60 3.2
+ * Destroy the object and release all memory objects
+ */    
+    ~CCSXHMainTopics();
+/** 
+*  @function GetViewID
+*  @since S60 3.2
+*  Get ViewId to activate the View
+*  @return View Id
+*/    
+    TUid GetViewID() const;
+/** 
+*  @function ResetChildList
+*  @since S60 3.2
+*  Delete Objects from the Array
+*/    
+    void ResetChildList();
+    
+    protected:
+   
+/** 
+*  @function CCSXHMainTopics
+*  @since S60 3.2
+*  Construct a CCSXHMainTopics
+*  @param aUid  - Application Uid
+*         aName - TOC1 Object Name  
+*/    
+    CCSXHMainTopics(const TUid& aUid, const TDesC& aName, const TInt32 aPriority);
+    	
+    const TUid &iUid;
+    };
+
+#endif /* INC_CSXHMAINTOPICS_H_HEADER_INCLUDED_BC0568C5 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHRuntimeIndexing.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,160 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  This is a utility class that provides functionality
+*                for scanning app help folder, generate index XML
+*                at runtime, and also update it if any install/uninstall        
+*
+*/
+
+#ifndef CSXHRUNTIMEINDEXING_H
+#define CSXHRUNTIMEINDEXING_H
+
+// INCLUDES
+#include <e32base.h>
+#include <f32file.h>
+
+// CONSTANTS
+// the help content folder doesn't exist
+const TInt KNoDirExist = -3;
+// there is no changes in help content folder (like install/uninstall)
+const TInt KNoChange = -2;
+// there is no index.xml file (due to no help content at previous time)
+const TInt KNoIndexExist = -1;
+
+// FORWARD CLASS DECLARATION
+class CCSXHHtmlTOC1;
+class CCSXHKywdTOC1;
+class CCoeEnv;
+
+/*
+ * runtime indexing handling class
+ * responsible for generating index file, maintaining it.
+ * this class also create CS X Help private folder if not exist
+ * 
+ */
+class CCSXHRuntimeIndexing : public CBase
+    {
+public:
+
+    /*
+     * constructor
+     */
+    CCSXHRuntimeIndexing();
+    /*
+    
+     * destructor
+     */
+    ~CCSXHRuntimeIndexing();
+    
+    /*
+     * Two-phase constructor
+     */
+    static CCSXHRuntimeIndexing* NewL();
+    
+    /*
+     * Generate the master index file content
+     * @param aToc1: TOC1 object which contains main topic information
+     * @param aFeature: Feature information, supported by Feature Mgr
+     */
+    void RuntimeGenerateIndexL( const CCSXHHtmlTOC1& aToc1, const TDesC& aFeature );
+    
+    /*
+     * Check whether master index exist
+     * Since Z based helps must exist
+     * Usage: to determine Help was launched before
+     */
+    TBool IndexFileExistsL();
+    
+    /*
+     * create temporary index file
+     * this file will be saved to C:\\private\\<help-uid>\\<aDrive>\\<lang-id>\\
+     * @param: aDrive Drive information
+     */
+    void BeginIndexFileL( const TChar& aDrive );
+    
+    /*
+     * close the temporary index file, and rename it to index.xml formally
+     * tmp.xml -> index.xml
+     * this function can backup index.xml, once exception happens
+     */
+    void FinishAndCloseIndexFileL();
+    
+    /*
+     * Get help application private path in C drive
+     * @param aName[out] return help app private path in C
+     */
+    void GetPrivatePath( TDes& aName );
+    
+    /*
+     * Get proper locale, and append it to descriptor
+     * for more information about proper locale
+     *   please refer to BaflUtils::GetDowngradePathL
+     * @param aDir[out] append proper locale
+     */
+    void AppendLocaleL( TDes& aDir );
+    
+    /*
+     * Delete master index file, particular in C: or E: or F: (user disk)
+     * this will only occur when user remove all custom helps, no more helps folder
+     *   in this case, custom index mustn't exist.
+     * @param aDrive the file to be deleted
+     */
+    void DeleteIndexFileL( const TChar& aDrive );
+    
+    /*
+     * Check if helps folder changed
+     * changes include: 
+     *        A: install new application
+     *        B: uninstall (if unistall all helps, custom helps folder will also removed)
+     *        C: user changed the language
+     *        D: user restored the cell phone
+     * @param aName[out] return help app private path in C
+     */
+    TInt CheckDirChangeL( const TChar& aDrive );
+    
+private:
+
+    /*
+     * two-phase constructor, private
+     */
+    void ConstructL();
+    
+private:
+
+    /*
+     * buff current index file name
+     * owned
+     */
+    HBufC* iFullDirName;
+    
+    /*
+     * CoeEnv
+     * not owned
+     */
+    CCoeEnv * iCoeEnv;
+    
+    /*
+     * current index file handle
+     */
+    RFile iFile;
+    
+    /*
+     * actually it's iFullDirName's drive letter
+     * for more convenient, keep it as a class member
+     */
+    TChar iDriveLetter;
+    
+    };
+    
+#endif // CSXHRUNTIMEINDEXING_H
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHViewIDs.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,36 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  This file contains ViewIds
+*
+*/
+
+
+#ifndef INC_CSXHVIEWIDS_H_HEADER_INCLUDED_BC05356D
+#define INC_CSXHVIEWIDS_H_HEADER_INCLUDED_BC05356D
+
+#include <e32std.h>
+
+const TUid KCSXHToc1ViewID = {1};
+const TUid KCSXHToc2ViewID = {2};
+const TUid KCSXHHtmlTopicViewID = {3};
+const TUid KCSXHLegacyTopicViewID = {4};
+const TUid KCSXHKywdToc1ViewID = {5};
+const TUid KCSXHKywdToc2ViewID = {6};
+const TUid KCSXHContextHtmlTopicViewID = {7};
+const TUid KCSXHContextLegacyTopicViewID = {8};
+const TUid KCSXHToc1AppHelpsViewID = {9};
+const TUid KCSXHToc2AppHelpsViewID = {10};
+
+
+#endif /* INC_CSXHVIEWIDS_H_HEADER_INCLUDED_BC05356D */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CSXHXMLParseHandler.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,582 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHXMLParseHandler class declaration
+*
+*/
+
+
+#ifndef __CCSXHXMLPARSEHANDLER_H__
+#define __CCSXHXMLPARSEHANDLER_H__
+
+#include <coecntrl.h> // CCoeControl
+#include <MSenContentHandlerClient.h>
+#include <xml/taginfo.h>
+#include <xml/attribute.h>
+
+class CCSXHGenericTOC2;
+class CCSXHGenericTOC1;
+class CCSXHHtmlTOC1;
+class CCSXHHelpDataBase;
+class CCSXHHelpContentBase;
+class CCSXHHTMLContentParser;
+/** 
+* @class CCSXHXMLParseHandler
+* This class is used retrive the data from XML file
+*/
+class CCSXHXMLParseHandler : public CBase, public MSenContentHandlerClient
+    {
+	public:
+/** 
+*  @function CCSXHXMLParseHandler
+*  @since S60 3.2
+*  Construct a CCSXHXMLParseHandler 
+*  @param aCoeEnv 	- Control Environment 
+*/	
+		CCSXHXMLParseHandler(CCoeEnv * aCoeEnv);
+		
+		virtual ~CCSXHXMLParseHandler();
+/** 
+*  @function StartDocument
+*  @since S60 3.2
+*  Receive notification of the beginning of a document. 
+*  @return KErrNone or some of the system-wide Symbian error codes 
+*/	
+		TInt StartDocument(); 
+/** 
+*  @function EndDocument
+*  @since S60 3.2
+*  Receive notification of the end of a document. 
+*  @return KErrNone or some of the system-wide Symbian error codes 
+*/	
+		TInt EndDocument();
+
+/** 
+*  @function SetDataBasePtr
+*  @since S60 3.2
+*  Sets DataBase Pointer
+*/
+		void  SetDataBasePtr(CCSXHHelpDataBase *aDataBase);		
+/** 
+*  @function GetApplicationName
+*  @since S60 3.2
+*  Get the Application Name from Meta.xml
+*  @return Application Name
+*/
+		TDesC& GetApplicationName();
+		
+		TPtr GetFeatureIds();
+ 		
+ 	protected:
+/** 
+*  @function SetAppNameFlagL
+*  @since S60 3.2
+*  Set the Application Flag Based on local Name, ResourceID
+*  @param alocalName - TagName read from XML file
+*		  ResourceId - Used to Retrive the TagName from resource file   	
+*/		
+ 		TBool SetAppNameFlag(const TDesC8 & alocalName,const TDesC& aAppTag);		
+ 		
+ 	protected:
+		TBuf<KMaxFileName> iApplicationName;
+		HBufC* iFeatureIds;		
+		TBool iIsAppName;
+		CCSXHHelpDataBase* iDataBase;
+		CCoeEnv* iCoeEnv;		
+		
+	};
+
+
+/** 
+* @class CCSXHXMLParseHandler_MetaFile
+* This class is used retrive the data from Meta.xml file
+*/	
+class CCSXHXMLParseHandler_MasterMetaFile : public CCSXHXMLParseHandler
+	{
+	public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHXMLParseHandler_IndexFile 
+*  @param aCoeEnv 	- Control Environment 
+*  @retrun a CCSXHXMLParseHandler_IndexFile pointer
+*/
+		static CCSXHXMLParseHandler_MasterMetaFile* NewL(CCoeEnv * aCoeEnv);
+	protected:
+/** 
+*  @function CCSXHXMLParseHandler_IndexFile
+*  @since S60 3.2
+*  Construct a CCSXHXMLParseHandler_IndexFile 
+*  @param aCoeEnv 	- Control Environment 
+*/	
+		CCSXHXMLParseHandler_MasterMetaFile(CCoeEnv * aCoeEnv);		
+	public:	
+/** 
+*  @function StartElement
+*  @since S60 3.2
+*  Receive notification of the beginning of an element
+*  @param aURI		 -  The Namespace URI, or the empty string 
+						if the element has no Namespace URI or
+						if Namespace processing is not being performed.  
+		  aLocalName -  The local name (without prefix)  
+		  aName		 -  The qualified name  
+		  apAttrs	 -  The attributes attached to the element. 
+		  				If there are no attributes, it shall be 
+		  				an empty array.Namespaces declared in the current 
+		  				element will be located in the array also 
+*  @return KErrNone or some of the system-wide Symbian error codes 
+*/	
+		TInt StartElement (const TDesC8 &aURI, const TDesC8 &aLocalName, 
+		const TDesC8 &aName, const RAttributeArray &apAttrs);
+/** 
+*  @function SetHtmlContentParserPtr
+*  @since S60 3.2
+*  Set the pointer of the content parser
+*  @param aParser   -  Pointer to an html content parser
+*/			 
+		void SetHtmlContentParserPtr(CCSXHHTMLContentParser* aParser);
+		
+	private:
+/** 
+*  @function CreateTOC2ObjectsL
+*  @since S60 3.2
+*  Create TOC2 objects for Html TOC2 
+*  @param aAttributes - The attributes attached to the element. 
+*/	
+		void CreateTOC1ObjectsL(const RAttributeArray & aAttributes);
+	    
+	    CCSXHHTMLContentParser *iParser;
+	    
+	    TInt iDrive;
+	};
+
+/** 
+* @class CCSXHXMLParseHandler_MetaFile
+* This class is used retrive the data from Meta.xml file
+*/	
+class CCSXHXMLParseHandler_MetaFile : public CCSXHXMLParseHandler
+	{
+	public:
+/** 
+*  @function CCSXHXMLParseHandler_MetaFile
+*  @since S60 3.2
+*  Construct a CCSXHXMLParseHandler_MetaFile 
+*  @param aCoeEnv 	- Control Environment 
+*  @retrun a CCSXHXMLParseHandler_MetaFile pointer
+*/	
+		static CCSXHXMLParseHandler_MetaFile* NewL(CCoeEnv * aCoeEnv);
+	protected:
+/** 
+*  @function CCSXHXMLParseHandler_MetaFile
+*  @since S60 3.2
+*  Construct a CCSXHXMLParseHandler_MetaFile 
+*  @param aCoeEnv 	- Control Environment 
+*/
+		CCSXHXMLParseHandler_MetaFile(CCoeEnv * aCoeEnv);
+	public:	
+/** 
+*  @function StartElement
+*  @since S60 3.2
+*  Receive notification of the beginning of an element
+*  @param aURI		 -  The Namespace URI, or the empty string 
+						if the element has no Namespace URI or
+						if Namespace processing is not being performed.  
+		  aLocalName -  The local name (without prefix)  
+		  aName		 -  The qualified name  
+		  apAttrs	 -  The attributes attached to the element. 
+		  				If there are no attributes, it shall be 
+		  				an empty array.Namespaces declared in the current 
+		  				element will be located in the array also 
+*  @return KErrNone or some of the system-wide Symbian error codes 
+*/	
+		TInt StartElement (const TDesC8 &aURI, const TDesC8 &aLocalName, 
+		const TDesC8 &aName, const RAttributeArray &apAttrs);
+/** 
+*  @function EndElement
+*  @since S60 3.2
+*  Receive notification of the end of an element
+*  @param aURI		 -  The Namespace URI, or the empty string 
+						if the element has no Namespace URI or
+						if Namespace processing is not being performed.  
+		  aLocalName -  The local name (without prefix)  
+		  aName		 -  The qualified name  
+*  @return KErrNone or some of the system-wide Symbian error codes 
+*/		
+		TInt EndElement  (  const TDesC8 &aURI,const TDesC8 &aLocalName,const TDesC8 &aName);
+/** 
+*  @function Characters
+*  @since S60 3.2
+*  Receive notification inside an element
+*  @param aBuff   -  The characters.  
+*		  aStart  -  The start position in the character buffer.  
+*		  aLength -  The number of characters to use from the character buffer.  
+*  @return KErrNone or some of the system-wide Symbian error codes 
+*/		
+		TInt Characters (const TDesC8 &aBuff, const TInt aStart,
+			 const TInt aLength); 					
+		
+		TInt32 Priority();
+		
+	private:
+		TBuf<8> iPriority;
+		TBool iIsPriority;
+	};
+
+class CCSXHXMLParseHandler_IndexFile : public CCSXHXMLParseHandler
+	{
+	public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHXMLParseHandler_IndexFile 
+*  @param aCoeEnv 	- Control Environment 
+*  @retrun a CCSXHXMLParseHandler_IndexFile pointer
+*/
+		static CCSXHXMLParseHandler_IndexFile* NewL(CCoeEnv * aCoeEnv);
+	protected:
+/** 
+*  @function CCSXHXMLParseHandler_IndexFile
+*  @since S60 3.2
+*  Construct a CCSXHXMLParseHandler_IndexFile 
+*  @param aCoeEnv 	- Control Environment 
+*/	
+		CCSXHXMLParseHandler_IndexFile(CCoeEnv * aCoeEnv);		
+	public:	
+/** 
+*  @function StartElement
+*  @since S60 3.2
+*  Receive notification of the beginning of an element
+*  @param aURI		 -  The Namespace URI, or the empty string 
+						if the element has no Namespace URI or
+						if Namespace processing is not being performed.  
+		  aLocalName -  The local name (without prefix)  
+		  aName		 -  The qualified name  
+		  apAttrs	 -  The attributes attached to the element. 
+		  				If there are no attributes, it shall be 
+		  				an empty array.Namespaces declared in the current 
+		  				element will be located in the array also 
+*  @return KErrNone or some of the system-wide Symbian error codes 
+*/	
+		TInt StartElement (const TDesC8 &aURI, const TDesC8 &aLocalName, 
+		const TDesC8 &aName, const RAttributeArray &apAttrs);
+/** 
+*  @function SetArray
+*  @since S60 3.2
+*  Get the pointer & fill the contents from Index.xml
+*  @param aHTMLlist   -  Pointer to an Array
+*/			 
+		void SetArray(RPointerArray<CCSXHHelpContentBase> *aHTMLlist);	
+/** 
+*  @function SetGenericTOC1Object
+*  @since S60 3.2
+*  Set GenericTOC1 Object
+*  @param aParent   -  Generic TOC1 Object
+*/			 
+		void SetGenericTOC1Object(CCSXHGenericTOC1& aParent); 		
+/** 
+*  @function SetPath
+*  @since S60 3.2
+*  Set Html file path
+*  @param aFilePath   -  Set Html file path
+*/		
+		void SetPath(const TDesC&  aFilePath);
+		
+		void SetHtmlContentParserPtr(CCSXHHTMLContentParser* aParser);		
+	private:
+/** 
+*  @function CreateTOC2ObjectsL
+*  @since S60 3.2
+*  Create TOC2 objects for Html TOC2 
+*  @param aAttributes - The attributes attached to the element. 
+*/	
+		void CreateTOC2ObjectsL(const RAttributeArray & aAttributes);
+		TBuf<KMaxFileName> iCompressString,iHTMLPageName,iFilePath; 					
+		RPointerArray<CCSXHHelpContentBase>* iTOC2Array; 
+		CCSXHGenericTOC1* iParent;	
+		CCSXHHTMLContentParser *iParser;
+	};
+
+	
+class CCSXHXMLParseHandler_Kywd : public CCSXHXMLParseHandler
+	{
+	public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHXMLParseHandler_Kywd 
+*  @param aCoeEnv 	- Control Environment 
+*  @retrun a CCSXHXMLParseHandler_Kywd pointer
+*/
+		static CCSXHXMLParseHandler_Kywd* NewL(CCoeEnv * aCoeEnv);
+	protected:
+/** 
+*  @function CCSXHXMLParseHandler_Kywd
+*  @since S60 3.2
+*  Construct a CCSXHXMLParseHandler_Kywd 
+*  @param aCoeEnv 	- Control Environment 
+*/	
+		CCSXHXMLParseHandler_Kywd(CCoeEnv * aCoeEnv);	
+	public:
+/** 
+*  @function StartElement
+*  @since S60 3.2
+*  Receive notification of the beginning of an element
+*  @param aURI		 -  The Namespace URI, or the empty string 
+						if the element has no Namespace URI or
+						if Namespace processing is not being performed.  
+		  aLocalName -  The local name (without prefix)  
+		  aName		 -  The qualified name  
+		  apAttrs	 -  The attributes attached to the element. 
+		  				If there are no attributes, it shall be 
+		  				an empty array.Namespaces declared in the current 
+		  				element will be located in the array also 
+*  @return KErrNone or some of the system-wide Symbian error codes 
+*/	
+		TInt StartElement (const TDesC8 &aURI, const TDesC8 &aLocalName, 
+		const TDesC8 &aName, const RAttributeArray &apAttrs);
+/** 
+*  @function EndElement
+*  @since S60 3.2
+*  Receive notification of the end of an element
+*  @param aURI		 -  The Namespace URI, or the empty string 
+						if the element has no Namespace URI or
+						if Namespace processing is not being performed.  
+		  aLocalName -  The local name (without prefix)  
+		  aName		 -  The qualified name  
+*  @return KErrNone or some of the system-wide Symbian error codes 
+*/		
+		TInt EndElement  (  const TDesC8 &aURI,const TDesC8 &aLocalName,const TDesC8 &aName);
+/** 
+*  @function Characters
+*  @since S60 3.2
+*  Receive notification inside an element
+*  @param aBuff   -  The characters.  
+*		  aStart  -  The start position in the character buffer.  
+*		  aLength -  The number of characters to use from the character buffer.  
+*  @return KErrNone or some of the system-wide Symbian error codes 
+*/		
+		TInt Characters (const TDesC8 &aBuff, const TInt aStart,
+			 const TInt aLength); 
+
+/** 
+*  @function SetTOC1Title
+*  @since S60 3.2
+*  Set TOC1 Name 
+*  @param aName   -  TOC1 Name  
+*/
+ 		void SetTOC1Title(const TDesC& aName);
+/** 
+*  @function SetCurrentHtmlToc1
+*  @since S60 3.2
+*  Set HtmlTOC1 Object
+*  @param aCurrentHtmlToc1   -  Pointyer to HtmlTOC1 Object  
+*/
+		void SetCurrentHtmlToc1(CCSXHHtmlTOC1 *aCurrentHtmlToc1);
+/** 
+*  @function SetIsTOC2
+*  @since S60 3.2
+*  Set the flag if parsing in order to get TOC2 Objects, EFalse otherwise
+*  @param aCurrentHtmlToc1   -  Pointer to HtmlTOC1 Object  
+*/
+		void SetIsTOC2(TBool aFlag);		
+
+/** 
+*  @function SetPath
+*  @since S60 3.2
+*  Set Html file path
+*  @param aFilePath   -  Set Html file path
+*/		
+		void SetPath(const TDesC&  aFilePath);
+		
+		void SetHtmlContentParserPtr(CCSXHHTMLContentParser* aParser);
+		
+	private:
+/** 
+*  @function CreateTOC2ObjectsforKeywordSearch
+*  @since S60 3.2
+*  Get the Info In order to Create TOC2 objects for Html Keyword 
+*  @param aName  - TagName
+*		  aAttrs - The attributes attached to the element. 
+*/
+		void CreateTOC2ObjectsforKeywordSearch(const TDesC8 &aName,const RAttributeArray& aAttrs); 		
+/** 
+*  @function CreateTOC2ObjectsforKeywordSearchL
+*  @since S60 3.2
+*  Creates TOC2 objects for Html Keyword And Insert into Database  
+*/
+		void CreateAndInsertKywdL();		
+ 		TBuf<KMaxFileName> iHTMLPageName,iKeywordSearchTOC2TitleName; 					
+ 		TBuf<KMaxFileName> iTOC1Name,iFilePath;
+ 		CCSXHHtmlTOC1 *iCurrentHtmlToc1;
+ 		TBool iIsTargetName,iIsTOC2View;
+ 		CCSXHHTMLContentParser* iParser;
+	};	
+
+class CCSXHXMLParseHandler_MasterKywd : public CCSXHXMLParseHandler
+	{
+	public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHXMLParseHandler_Kywd 
+*  @param aCoeEnv 	- Control Environment 
+*  @retrun a CCSXHXMLParseHandler_Kywd pointer
+*/
+		static CCSXHXMLParseHandler_MasterKywd* NewL(CCoeEnv * aCoeEnv);
+	protected:
+/** 
+*  @function CCSXHXMLParseHandler_Kywd
+*  @since S60 3.2
+*  Construct a CCSXHXMLParseHandler_Kywd 
+*  @param aCoeEnv 	- Control Environment 
+*/	
+		CCSXHXMLParseHandler_MasterKywd(CCoeEnv * aCoeEnv);	
+		
+	public:
+/** 
+*  @function StartElement
+*  @since S60 3.2
+*  Receive notification of the beginning of an element
+*  @param aURI		 -  The Namespace URI, or the empty string 
+						if the element has no Namespace URI or
+						if Namespace processing is not being performed.  
+		  aLocalName -  The local name (without prefix)  
+		  aName		 -  The qualified name  
+		  apAttrs	 -  The attributes attached to the element. 
+		  				If there are no attributes, it shall be 
+		  				an empty array.Namespaces declared in the current 
+		  				element will be located in the array also 
+*  @return KErrNone or some of the system-wide Symbian error codes 
+*/	
+		TInt StartElement (const TDesC8 &aURI, const TDesC8 &aLocalName, 
+		const TDesC8 &aName, const RAttributeArray &apAttrs);
+/** 
+*  @function CreateTOC1ObjectsL
+*  @since S60 3.2
+*  Create TOC1 objects for Keywords
+*  @param aAttributes - The attributes attached to the element. 
+*/	
+		void CreateTOC1ObjectsL(const RAttributeArray&  aAttributes);
+
+/** 
+*  @function SetCurrentHtmlToc1
+*  @since S60 3.2
+*  Set HtmlTOC1 Object
+*  @param aCurrentHtmlToc1   -  Pointyer to HtmlTOC1 Object  
+*/
+		void SetCurrentHtmlToc1(CCSXHHtmlTOC1 *aCurrentHtmlToc1);
+		
+/** 
+*  @function SetHtmlContentParserPtr
+*  @since S60 3.2
+*  Set the pointer of the content parser
+*  @param aParser   -  Pointer to an html content parser
+*/			 
+		void SetHtmlContentParserPtr(CCSXHHTMLContentParser* aParser);		
+		
+
+	private:
+ 		CCSXHHtmlTOC1 *iCurrentHtmlToc1; 		
+ 		CCSXHHTMLContentParser *iParser;
+	};  
+
+/** 
+* @class CCSXHXMLParseHandler_RedirectFile
+* This class is used retrive the data from redirect.xml file
+*/	
+class CCSXHXMLParseHandler_RedirectFile : public CCSXHXMLParseHandler
+	{
+	public:
+/** 
+*  @function CCSXHXMLParseHandler_RedirectFile
+*  @since S60 3.2
+*  Construct a CCSXHXMLParseHandler_RedirectFile 
+*  @param aCoeEnv 	- Control Environment 
+*  @param aSourceUid - source uid
+*  @param aSourceContextname - source context name
+*  @retrun a CCSXHXMLParseHandler_RedirectFile pointer
+*/	
+		static CCSXHXMLParseHandler_RedirectFile* NewL(CCoeEnv * aCoeEnv, 
+				const TUid &aSourceUid, const TCoeContextName &aSourceContextName);
+
+	protected:
+/** 
+*  @function CCSXHXMLParseHandler_RedirectFile
+*  @since S60 3.2
+*  Construct a CCSXHXMLParseHandler_RedirectFile 
+*  @param aCoeEnv 	- Control Environment 
+*  @param aSourceUid - source uid
+*  @param aSourceContextname - source context name
+*/
+		CCSXHXMLParseHandler_RedirectFile(CCoeEnv * aCoeEnv, 
+				const TUid &aSourceUid, const TCoeContextName &aSourceContextName);
+
+	public:	
+/** 
+*  @function StartElement
+*  @since S60 3.2
+*  Receive notification of the beginning of an element
+*  @param aURI		 -  The Namespace URI, or the empty string 
+						if the element has no Namespace URI or
+						if Namespace processing is not being performed.  
+		  aLocalName -  The local name (without prefix)  
+		  aName		 -  The qualified name  
+		  apAttrs	 -  The attributes attached to the element. 
+		  				If there are no attributes, it shall be 
+		  				an empty array.Namespaces declared in the current 
+		  				element will be located in the array also 
+*  @return KErrNone or some of the system-wide Symbian error codes 
+*/	
+		TInt StartElement (const TDesC8 &aURI, const TDesC8 &aLocalName, 
+		const TDesC8 &aName, const RAttributeArray &apAttrs);
+/** 
+*  @function EndElement
+*  @since S60 3.2
+*  Receive notification of the end of an element
+*  @param aURI		 -  The Namespace URI, or the empty string 
+						if the element has no Namespace URI or
+						if Namespace processing is not being performed.  
+		  aLocalName -  The local name (without prefix)  
+		  aName		 -  The qualified name  
+*  @return KErrNone or some of the system-wide Symbian error codes 
+*/		
+		TInt EndElement  (  const TDesC8 &aURI,const TDesC8 &aLocalName,const TDesC8 &aName);
+/** 
+*  @function Characters
+*  @since S60 3.2
+*  Receive notification inside an element
+*  @param aBuff   -  The characters.  
+*		  aStart  -  The start position in the character buffer.  
+*		  aLength -  The number of characters to use from the character buffer.  
+*  @return KErrNone or some of the system-wide Symbian error codes 
+*/		
+		TInt Characters (const TDesC8 &aBuff, const TInt aStart,
+			 const TInt aLength); 
+		
+		TBool IsTargetPathFound();
+		TUid TargetUid();
+		TBuf<KMaxFileName>& TargetContextName();
+
+	private:
+
+		TCoeContextName iSourceContextName;
+		TCoeContextName iFromContent;
+		TBuf<KMaxFileName> iTargetPath; 
+		TBool iIsFromTag;
+		TBool iIsToTag;
+		TBool iIsSourceContextNameFound;
+		TBool iIsTargetPathFound;
+		TUid  iTargetUid;
+		TBuf<KMaxFileName> iTargetContextName;
+	};
+#endif 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/CsHelpCmdLineParser.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  This is a utility class that provides functionality
+*				 for parsing command line arguments passed into the
+*				 Cshelp application when launched by another application.		
+*
+*/
+
+
+#ifndef CSHELPCMDLINEPARSER_H
+#define CSHELPCMDLINEPARSER_H
+
+
+// INCLUDES
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class TCoeHelpContext;
+
+// CLASS DECLARATION
+/**
+*  CCsHlpCmdLineParser class.
+*  to convert a message - that is passed from other app - to contexts
+*  @lib euser.lib
+*  @since 3.2
+*/
+class CCsHlpCmdLineParser : public CBase
+    {
+    public:
+
+/** 
+*  @function CCsHlpCmdLineParser
+*  @since S60 3.2
+*  Perform the first phase of two phase construction
+*/        CCsHlpCmdLineParser();
+
+/** 
+*  @function ConstructL
+*  @since S60 3.2
+*  Perform the second phase construction of a CCsHlpCmdLineParser object
+*/        void ConstructL(const TDesC8& aCmdLine);
+    
+/** 
+*  @function ~CCsHlpCmdLineParser
+*  @since S60 3.2
+*  Destroy the object and release all memory objects
+*/
+        ~CCsHlpCmdLineParser();
+
+    public:
+/** 
+*  Get contexts array
+*  @function ContextListL
+*  @since S60 3.2
+*  @return help context array
+*/        
+        CArrayFix<TCoeHelpContext>* ContextListL();
+
+    private:
+/** 
+*  Get the help Context object
+*  @function GetContext
+*  @since S60 3.2
+*  @param aContext - Help context object
+*/         
+        void GetContext(TCoeHelpContext& aContext);
+    
+    private:
+        // Parsed data to help context array.
+        CBufFlat* iCmdLine;
+
+        // Position of iCmdLine
+        TInt iPos;
+    };
+
+#endif // CSHELPCMDLINEPARSER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/inc/csxhconstants.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,188 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  This file Contains Constants 
+*
+*/
+
+
+_LIT(KEmptyString,"");
+_LIT(KFwdSlash,"\\"); 
+_LIT(KBackSlash,"/"); 
+_LIT(KTabSpace,"\t");
+_LIT(KHexPrefix,"0x");
+_LIT(KZero,"0");
+_LIT(KZipFileExtn,".zip");
+_LIT(KHtmlFileExtn,".html"); 
+_LIT(KContentZipFile,"contents.zip");
+_LIT(KCsstext_First,"<style>\n");
+// temp string. if xml file and help tool chain is ready.it can be deleted.
+_LIT(KDefaultFeatureIdStringTemp,"-1");
+_LIT(KDefaultFeatureIdString,"true-1");
+_LIT(KTrue_StringtoAppend,"true_");
+_LIT(KFalse_StringtoAppend,"false_");
+_LIT(KFalseString,"false");
+_LIT(KTrueString,"true");
+
+_LIT(KtextFormat_true_a,"#true_%d_A,");
+_LIT(KtextFormat_false,"#false_%d_A,#false_%d_B,#false_%d_L,");
+
+_LIT(KtextFormat_true_b,"#true_%d_B,");
+_LIT(KtextFormat_false_b,"#false_%d_B,");
+
+_LIT(KtextFormat_true_l,"#true_%d_L,");
+_LIT(KtextFormat_false_l,"#false_%d_L,");
+
+_LIT(KtextFormat_lang_a,"#LANGUAGE_%d_A,");
+_LIT(KtextFormat_lang_b,"#LANGUAGE_%d_B,");
+_LIT(KtextFormat_lang_l,"#LANGUAGE_%d_L,");
+_LIT(KtextFormat_lang_0a,"#LANGUAGE_0%d_A,");
+_LIT(KtextFormat_lang_0b,"#LANGUAGE_0%d_B,");
+_LIT(KtextFormat_lang_0l,"#LANGUAGE_0%d_L,");
+
+_LIT(KDefaultFeatureId,"#true-1");
+_LIT(KComma,",");
+_LIT(KCsstext_displayp_li,"{display:list-item;}\n");
+_LIT(KCsstext_displayp_p,"{display:block;}\n");
+_LIT(KCsstext_displayp_a,"{display:inline;}\n");
+_LIT(KCsstext_displayp_n,"{display:none;}\n");
+_LIT(KCsstext_Last,"</style>\n");
+
+#ifdef FF_HELP_TUTORIAL_MERGE
+_LIT(KTutorialFileExtn,".tut");
+#endif // FF_HELP_TUTORIAL_MERGE
+#ifndef __SERIES60_30__
+_LIT(KFileUrlPrefix,"file:///");
+const TInt KFileUrlPrefixLength = 8;
+#else
+_LIT(KFileUrlPrefix,"file://");
+const TInt KFileUrlPrefixLength = 7;
+#endif
+
+const TInt KHexPrefixLength = 2;
+const TInt KHexUidLength = 8;
+const TInt KOffsetFromUidToContext = 11;
+
+const TInt KHighestPriority = 1;
+const TInt KLowestPriority = 20000;
+
+const TInt KMaxContextName = 30;
+
+//xhtml folder name
+//#define	qtn_app_xhtml_folder_text ":\\resource\\xhtml\\"
+_LIT(KXhtmlFolder,":\\resource\\xhtml\\"); 
+
+//masterkeywords.xml file name
+_LIT(KMasterKywdFile,"keywords.xml"); 
+
+//mastermeta.xml file name
+_LIT(KMasterMetaFile,"index.xml"); 
+
+//redirect.xml file name
+_LIT(KRedirectFile,"redirect.xml"); 
+
+//meta.xml file name
+//#define	qtn_app_meta_file_text "meta.xml"
+_LIT(KMetaFile,"meta.xml"); 
+
+//index.xml file name
+//#define	qtn_app_index_file_text	"index.xml"
+_LIT(KIndexFile,"index.xml"); 
+
+_LIT(KRomAppUidFile, "appuid.dat");
+//Application name tag in meta.xml
+//#define	qtn_app_application_name_tag_text "title"
+_LIT(KAppNameTag,"title"); 
+
+_LIT(KPriorityTag, "priority");
+
+_LIT(KFromTag, "from");
+
+_LIT(KToTag, "to");
+
+// toc1 drive information in master index.xml
+//
+_LIT( KDriveInfo, "drive");
+
+// toc1 tag in master index.xml
+// 
+_LIT( KAppFeatureIDTag,"FeatureID" );
+
+//toc2title tag in index.xml
+//#define	qtn_app_toc2title_name_tag_text	"navtitle"
+_LIT(KTOC2NameTag,"navtitle"); 
+
+//html page tag in index.xml
+//#define	qtn_app_htmlpage_name_tag_text "href"
+_LIT(KHtmlPageTag,"href"); 
+
+//#define	qtn_app_compress_name_tag_text "compressed"
+_LIT(KCompressedTag,"compressed"); 
+
+//#define	qtn_app_compress_name_tag_value_text "true"
+_LIT(KCompressedTagText,"true"); 
+
+//#define qtn_app_searchview_toc1title_tag_text "text"
+_LIT(KSearchViewTOC1Tag,"text"); 
+//#define qtn_app_searchview_toc2title_tag_text "target"
+_LIT(KSearchViewTOC2Tag,"target"); 
+//#define qtn_app_kywd_file_text "keywords.xml"
+_LIT(KKeywordsFile,"keywords.xml"); 
+
+_LIT(KMasterSearchTag,"keyword"); 
+
+_LIT(KMasterCollectionTag,"collection"); 
+
+_LIT(KMasterCollection_idTag,"id"); 
+
+// Begin runtime indexing schema
+
+const TInt KMaxIndexEntryExclude = 200;
+
+const TInt KMaxUidLength = 10;
+
+// sis install path
+//
+//_LIT( KInstallPath, "?:\\data\\");
+_LIT( KInstallPath, ":\\resource\\xhtml\\");
+
+// initial file's name
+//
+_LIT( KInitFileName, "helpinit.txt" );
+
+// Index.xml version and encoding information
+//
+_LIT8( KIndexXMLVesion, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" );
+
+// Collection ends
+//
+_LIT8( KIndexCollectEnd, "</collections>" );
+
+// Begin of collection entry
+//
+_LIT8( KIndexXMLEntryBegin, "  <collection ");
+
+// End of collection entry
+//
+_LIT8( KIndexXMLEntryEnd, "\"></collection>\r\n");
+
+// Prefix of quotation mark
+//
+_LIT8( KIndexQuoteBegin, "=\"");
+
+// appendix of quotation mark
+//
+_LIT8( KIndexQuoteEnd, "\" ");
+
+
+_LIT( KMasterMetaTmpFile,"tmp.xml" ); 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/rss/HelpEngine.rss	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,155 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+*/
+
+NAME HELL
+#include <eikon.rh>
+#include <eikon.rsg>
+#include <avkon.rh>
+
+NAME HE
+// ---------------------------------------------------------
+//   
+//    Define the resource file signature 
+//    This resource should be empty.
+//
+// ---------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf=""; }
+// ---------------------------------------------------------
+//   
+//    Define default menu and CBA key.
+//
+// ---------------------------------------------------------
+//
+
+//								
+///    Folder Name Texts:		
+//	   Their content is at the loc-file	
+
+STRUCT STRING
+    {
+    LTEXT text;
+    }	
+
+RESOURCE TBUF r_type_xhtml_folder_name 
+    {
+    buf = qtn_app_xhtml_folder_text;
+    }
+    
+//								
+///    Meta FileName Texts:		
+//	   Their content is at the loc-file		
+
+RESOURCE TBUF r_type_meta_file_name 
+    {
+    buf = qtn_app_meta_file_text;
+    }
+    
+//								
+///    Index FileName Texts:		
+//	   Their content is at the loc-file		
+
+RESOURCE TBUF r_type_index_file_name 
+    {
+    buf = qtn_app_index_file_text;
+    }
+
+//								
+///    Keywordsearch FileName Texts:		
+//	   Their content is at the loc-file		
+RESOURCE TBUF r_type_kywd_file_name 
+    {
+    buf = qtn_app_kywd_file_text;
+    }   
+
+//								
+///    Forward slash:		
+//	   Their content is at the loc-file		
+RESOURCE TBUF r_type_forward_slash
+    {
+    buf = qtn_app_forward_slash_text;
+    }
+    
+//								
+///    ApplicationName Tag Texts:		
+//	   Their content is at the loc-file		
+
+RESOURCE TBUF r_type_application_tag_name 
+    {
+    buf = qtn_app_application_name_tag_text;
+    }
+
+//								
+///    Index FileName Texts:		
+//	   Their content is at the loc-file		
+
+RESOURCE TBUF r_type_toc2title_tag_name 
+    {
+    buf = qtn_app_toc2title_name_tag_text;
+    }
+
+//								
+///    Index FileName Texts:		
+//	   Their content is at the loc-file		
+
+RESOURCE TBUF r_type_htmlpage_tag_name 
+    {
+    buf = qtn_app_htmlpage_name_tag_text;
+    }
+    
+//								
+///    Index FileName Texts:		
+//	   Their content is at the loc-file		
+
+RESOURCE TBUF r_type_compress_tag_name 
+    {
+    buf = qtn_app_compress_name_tag_text;
+    }
+    
+//								
+///    Index FileName Texts:		
+//	   Their content is at the loc-file		
+RESOURCE TBUF r_type_compress_tag_value_name 
+    {
+    buf = qtn_app_compress_name_tag_value_text;
+    }
+    
+//								
+///    keywordsearch FileName Texts:		
+//	   Their content is at the loc-file		
+RESOURCE TBUF r_type_searchview_toc1title_tag_name 
+    {
+    buf = qtn_app_searchview_toc1title_tag_text;
+    }
+    
+//								
+///    keywordsearch FileName Texts:		
+//	   Their content is at the loc-file		
+RESOURCE TBUF r_type_searchview_toc2title_tag_name 
+    {
+    buf = qtn_app_searchview_toc2title_tag_text;
+    }
+    
+RESOURCE TBUF r_type_title_help
+    {
+    buf = qtn_help_title_hel;
+    }
+        
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHContextTopic.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHContextTopic class definition
+*
+*/
+
+#include "CSXHContextTopic.h"
+#include "CSXHViewIDs.h"
+#include "csxhconstants.h"
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHContextTopic* CCSXHContextTopic::NewL(CCSXHHelpContentBase* aToc2)
+    {
+    CCSXHContextTopic* self = new(ELeave) CCSXHContextTopic(aToc2);
+    return self;
+    }
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHContextTopic::CCSXHContextTopic(CCSXHHelpContentBase* aToc2):
+CCSXHHelpContentBase(KEmptyString),iToc2(aToc2)
+    {//No Implementation required
+    }
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+CCSXHContextTopic::~CCSXHContextTopic()
+    {
+    }
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+TUid CCSXHContextTopic::GetViewID() const
+    {
+    return iToc2->GetViewID() == KCSXHHtmlTopicViewID ? 
+                KCSXHContextHtmlTopicViewID : KCSXHContextLegacyTopicViewID;
+    }
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+EXPORT_C CCSXHHelpContentBase* CCSXHContextTopic::GetTopic()
+    {
+    return iToc2;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHGenericTOC1.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,168 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHGenericTOC1 class definition
+*
+*/
+
+#include "CSXHGenericTOC1.h"
+#include "csxhconstants.h"
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHGenericTOC1::CCSXHGenericTOC1(const TDesC& aName, const TInt32 aPriority):
+                    CCSXHHelpContentBase(aName, aPriority), iChildList(NULL)
+    {//No Implementation required
+    }
+    
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHGenericTOC1::~CCSXHGenericTOC1()
+    {
+    ResetChildList();
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+void CCSXHGenericTOC1::ResetChildList()
+    {
+    if(iChildList == NULL)
+        return;
+    TInt count =    iChildList->Count();
+    CCSXHHelpContentBase* toc2;
+    for(TInt i=0;i<count;++i )
+        {
+        toc2 = (*iChildList)[i];
+        delete toc2;
+        }
+    iChildList->Reset();
+    delete iChildList;
+    iChildList = NULL;
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+void CCSXHGenericTOC1::ConstructChildListL()
+    {
+    iChildList = new(ELeave) RPointerArray<CCSXHHelpContentBase>();
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+EXPORT_C CCSXHHelpContentBase* CCSXHGenericTOC1::GetChildL(const TDesC& aName)
+    {
+    if(iChildList == NULL)
+        return NULL;
+    
+    TInt count = iChildList->Count();
+    CCSXHHelpContentBase* child = NULL;
+    for(TInt i=0;i<count;++i )
+        {
+        child = (*iChildList)[i];
+        if(aName.Compare(child->GetName())==0)
+            return child;
+        }
+    return NULL;            
+    }
+    
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+EXPORT_C void CCSXHGenericTOC1::FillChildDataL(CDesCArray* aArray)
+    {
+    //Using Template Pattern. Both the functions below are virtual
+    InitChildList();
+    CopyChildListL(aArray);     
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+TBool CCSXHGenericTOC1::InsertChild(CCSXHHelpContentBase* aChild,
+TBool aDeleteObject)
+    {
+    ConstructChildList();
+    TLinearOrder<CCSXHHelpContentBase> anOrder(Orderer<CCSXHHelpContentBase>);  
+    if (KErrNone != iChildList->InsertInOrder(aChild,anOrder))
+        {
+        if(aDeleteObject)
+        	delete aChild;
+        
+        return EFalse;
+        }
+    return ETrue;           
+    }
+
+TBool CCSXHGenericTOC1::InsertChildWithPriority(CCSXHHelpContentBase* aChild, TBool aDeleteObject)
+    {
+    ConstructChildList();
+    TLinearOrder<CCSXHHelpContentBase> anOrder(OrdererWithPriority<CCSXHHelpContentBase>);  
+    if (KErrNone != iChildList->InsertInOrder(aChild,anOrder))
+        {
+        if(aDeleteObject)
+            delete aChild;
+        
+        return EFalse;
+        }
+    return ETrue;              
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+void CCSXHGenericTOC1::CopyChildListL(CDesCArray* aArray)
+    {
+    TInt count =    iChildList->Count();
+    CCSXHHelpContentBase* child;
+    for(TInt i = 0; i < count; ++i)
+        {
+        child = (*iChildList)[i];
+        if (child && child->GetName().Length() != 0)
+        	{
+            TBuf<KMaxFileName> toc2Entry(KTabSpace);
+            toc2Entry.Append(child->GetName());
+            aArray->AppendL(toc2Entry);
+            }
+        }       
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+void CCSXHGenericTOC1::InitChildList()
+    {
+    ConstructChildList();
+    }
+    
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+TBool CCSXHGenericTOC1::ConstructChildList()
+    {
+    if(iChildList != NULL)
+        return ETrue;
+        
+    TRAPD(err,ConstructChildListL());
+    if(err == KErrNone)
+        return ETrue;
+    else
+        {
+        iChildList = NULL;
+        return EFalse;
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHGenericTOC2.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHGenericTOC2 class definition
+*
+*/
+
+#include "CSXHGenericTOC2.h"
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHGenericTOC2::CCSXHGenericTOC2(CCSXHGenericTOC1* aParent, const TDesC& aName)
+    :CCSXHHelpContentBase(aName),iParent(aParent)
+    {//No Implementation required
+    }
+    
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+EXPORT_C CCSXHGenericTOC1* CCSXHGenericTOC2::GetParent() 
+    {
+    return iParent;
+    }
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHHTMLContentParser.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,1419 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHHTMLContentParser class definition
+*
+*/
+
+#include "CSXHHTMLContentParser.h"
+#include "CSXHXMLParseHandler.h"
+#include "CSXHHtmlTOC1.h"
+#include "CSXHKywdTOC1.h"
+#include "CSXHHtmlTOC2.h"
+#include "CSXHHelpDataBase.h"
+#include "csxhconstants.h"
+#include "CSXHRuntimeIndexing.h"
+#include "CSXHViewIDs.h"
+
+#include <eikenv.h> 
+#include <utf.h>
+#include <data_caging_path_literals.hrh>
+#include <zipfile.h>
+#include <bautils.h>
+#include <SenXmlReader.h> 
+#include <f32file.h>
+#include <pathinfo.h> 
+
+//Input Language variation changes
+#include <PtiEngine.h>
+
+const TInt KOffset = 2;
+        
+CCSXHHTMLContentParser* CCSXHHTMLContentParser::NewL(CCoeEnv* aCoeEnv)
+    {
+    CCSXHHTMLContentParser* self = CCSXHHTMLContentParser::NewLC(aCoeEnv);
+    CleanupStack::Pop(self);
+    return self;
+    }
+    
+CCSXHHTMLContentParser* CCSXHHTMLContentParser::NewLC(CCoeEnv* aCoeEnv)
+    {
+    CCSXHHTMLContentParser* self = new (ELeave) CCSXHHTMLContentParser(aCoeEnv);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+    
+void CCSXHHTMLContentParser::ConstructL()
+    {
+    //RUNTIME
+    GetSupportedFeatureListL();
+    }
+    
+CCSXHHTMLContentParser::CCSXHHTMLContentParser(CCoeEnv* aCoeEnv) : iCoeEnv(aCoeEnv)
+    {
+    }
+    
+CCSXHHTMLContentParser::~CCSXHHTMLContentParser()
+    {
+    delete iXmlReader;
+    
+    //No need to delete the entries here, it will be done by the database
+    iHtmlTOC1List.Close();
+    
+    //Delete all contents from the array.
+    TInt count =    iDuplicateHelpTopicList.Count();
+    CCSXHHtmlTOC1* toc1;
+    for(TInt i=0;i<count;++i )
+        {
+        toc1 = iDuplicateHelpTopicList[i];
+        delete toc1;
+        }
+    iDuplicateHelpTopicList.Reset();    
+    iDuplicateHelpTopicList.Close();
+    
+    // Closes the array and frees all memory allocated to the array.
+   // iSupportedFeatures.Close();
+    
+    delete iSupportedInputLanguages;
+    delete iFeatureManager_FeatureIds;
+    delete iIndexing;
+    }
+    
+void CCSXHHTMLContentParser::GenerateTOC1ListL(CCSXHHelpDataBase* aDataBase)
+    {       
+    RFs& FileSession = iCoeEnv->FsSession();
+
+    TDriveList DirList; 
+    if(FileSession.DriveList(DirList) != KErrNone)
+        return; 
+    CCSXHXMLParseHandler_MetaFile* XMLParser = CCSXHXMLParseHandler_MetaFile::NewL(iCoeEnv); 
+    CleanupStack::PushL(XMLParser);   
+    InitializeReaderL(XMLParser);
+    
+      
+    TBuf<KMaxFileName>* rootDir = new(ELeave) TBuf<KMaxFileName>;
+    CleanupStack::PushL(rootDir);//5
+
+    // begin runtime index XML generating
+    //   
+    iIndexing = CCSXHRuntimeIndexing::NewL();
+    TInt driveListSize = DirList.Length();
+    TBool dirExists = iIndexing->IndexFileExistsL();
+    CDirScan* scanner=CDirScan::NewLC(FileSession);
+#ifdef _DEBUG
+    RDebug::Print(_L("runtime indexing object successfully build"));
+#endif
+    for(TInt dir(0); dir < driveListSize; dir++)
+        {
+        TInt error;
+        TDriveInfo info;
+        TChar driveLetter = '?';
+        error = FileSession.Drive(info, dir);
+            
+        if  ( ( error == KErrNone ) && 
+                (DirList[dir] && info.iType != EMediaNotPresent))
+            {
+            RFs::DriveToChar( dir, driveLetter );
+            TInt dirChanged = iIndexing->CheckDirChangeL( driveLetter );
+            rootDir->Delete( 0, rootDir->Length() );//Clear the previous contents                  
+            rootDir->Append( driveLetter );
+
+            if  ( dirExists 
+                    && ( dirChanged == KNoChange
+                        || dirChanged == KNoDirExist) )
+                {
+                // xml exist and no install/uninstall happened
+                // while Z needs special process once its index file exists
+#ifdef _DEBUG
+                RDebug::Print(_L("Used to launch, scan drive number:  %d"), dir);
+#endif
+                if ( dirChanged == KNoChange )
+                    {
+                    // no modify helps, so just parse index.xml
+                    //
+                    HandleMasterMetaFileL( aDataBase, driveLetter, XMLParser );
+                    }
+                else // KNoDirExist
+                    {
+                    // help content folder removed due to some reason (uninstall/crash?)
+                    // delete index file in case it exist
+#ifdef _DEBUG
+                    RDebug::Print( _L("no resource folder, delete index.xml if exists") );
+#endif
+                    iIndexing->DeleteIndexFileL( driveLetter );
+                    }
+                }
+            else
+                {
+                // xml not exist or install/uninstall not happend
+                //
+                if( GetHTMLContentPathForDriveL( rootDir,iCoeEnv ) )
+                    {
+#ifdef _DEBUG
+                    RDebug::Print( _L("No index, scan folder for parsing, drive letter: %d"), dir );
+#endif
+                    iIndexing->BeginIndexFileL( driveLetter );
+                    scanner->SetScanDataL(*rootDir
+                                    ,KEntryAttDir|KEntryAttMatchExclusive,
+                                    ESortByName|EAscending, CDirScan::EScanDownTree);
+                    ScanAndParseXMLfileToCreateTOC1ObjectL(FileSession,scanner,aDataBase,
+                                                        dir,XMLParser);  
+                                                        
+                    iIndexing->FinishAndCloseIndexFileL();
+                    
+                    }
+                
+                }
+
+            }
+        }
+    CleanupStack::PopAndDestroy( scanner );
+    CleanupStack::PopAndDestroy(rootDir);
+    CleanupStack::PopAndDestroy(XMLParser);
+    
+    ClearReader();
+    }
+
+TBool CCSXHHTMLContentParser::GetHTMLContentPathForDriveL(TBuf<KMaxFileName>* aContentDrive,CCoeEnv *aCoeEnv)
+    {
+    // get the path to language level
+    // Input: aContentDrive == C or E or Z
+    // Output: aContentDrive == C:\\resource\\xhtml\\01\\ (or Z:\\resource\\xhtml\\31\\)
+    //
+    aContentDrive->Append(KXhtmlFolder);
+    TInt len = aContentDrive->Length();
+    RFs& FileSession = aCoeEnv->FsSession();
+    RArray<TLanguage> langs;
+       BaflUtils::GetDowngradePathL(FileSession,User::Language(),langs);
+            
+    for(int i = 0; i < langs.Count(); ++i)
+        {
+        TLanguage lang = langs[i];
+        //TSW Error: UKAL-6YL72P
+        //Tool chain uses full symbian language id in 
+        //the directory name, which is not detected by help application.
+        //
+        if(lang < 10)
+            {
+            aContentDrive->AppendNumFixedWidth(lang,EDecimal,2);
+            }
+        else
+            {
+            aContentDrive->AppendNum(lang);
+            }
+        
+        aContentDrive->Append(KFwdSlash);
+        if(BaflUtils::PathExists(FileSession,*aContentDrive))
+            {
+            langs.Reset();
+            return ETrue;
+            }
+        else
+            {
+            aContentDrive->Delete((len-1),aContentDrive->Length()-len);
+            }    
+        }
+        langs.Reset();
+        return EFalse;
+    }
+    
+TBool CCSXHHTMLContentParser::HandleMasterMetaFileL(CCSXHHelpDataBase* aDataBase, 
+                        TChar& aDrive, MSenContentHandlerClient *aPrevHandler)                                               
+    {
+    RFs& FileSession = iCoeEnv->FsSession();
+    TBuf<KMaxFileName> masterFile;
+
+    iIndexing->GetPrivatePath( masterFile );
+    masterFile.Append( aDrive );
+    masterFile.Append( KFwdSlash );
+    iIndexing->AppendLocaleL( masterFile );
+    masterFile.Append( KMasterMetaFile );
+    if(BaflUtils::FileExists( FileSession,masterFile ) )
+        {
+#ifdef _DEBUG
+        RDebug::Print(_L("index exist begin to parse!    %c"), TUint( aDrive ) );
+#endif
+        CCSXHXMLParseHandler_MasterMetaFile* masterMetaHandler = 
+        CCSXHXMLParseHandler_MasterMetaFile::NewL(iCoeEnv);
+        masterMetaHandler->SetDataBasePtr(aDataBase);
+        masterMetaHandler->SetHtmlContentParserPtr(this);
+        CleanupStack::PushL(masterMetaHandler);      
+    
+        iXmlReader->SetContentHandler(*masterMetaHandler);
+        // ParseL is not in async
+        iXmlReader->ParseL(FileSession,masterFile);
+        iXmlReader->SetContentHandler(*aPrevHandler);
+        CleanupStack::PopAndDestroy(masterMetaHandler);
+        }
+
+    return ETrue;
+    }
+
+TBool CCSXHHTMLContentParser::IsRedirectedL(CCSXHHelpDataBase *aDataBase, 
+                              const TDesC &aPath, TUid &aUid, TCoeContextName &aContextName)                                               
+    {
+    RFs& FileSession = iCoeEnv->FsSession();
+    TBuf<KMaxFileName> redirectFile( aPath );
+    redirectFile.Append( KRedirectFile );
+    TBool result = EFalse;
+    
+    if ( BaflUtils::FileExists( FileSession, redirectFile ) )
+        {
+        CCSXHXMLParseHandler_RedirectFile* XMLParser = 
+                     CCSXHXMLParseHandler_RedirectFile::NewL(iCoeEnv, aUid, aContextName);
+        XMLParser->SetDataBasePtr( aDataBase );
+     
+        CleanupStack::PushL( XMLParser );      
+        InitializeReaderL( XMLParser );
+        // ParseL is not in async
+        iXmlReader->ParseL( FileSession, redirectFile );
+        if ( XMLParser->IsTargetPathFound() )
+            {
+            TBuf<KMaxFileName>& targetContextName = XMLParser->TargetContextName();
+            if ( targetContextName.Length() <= aContextName.MaxLength() )
+                {
+                aUid = XMLParser->TargetUid();
+                aContextName = targetContextName;
+                result = ETrue;
+                }
+            }
+        CleanupStack::PopAndDestroy( XMLParser );
+        ClearReader();
+        }
+
+    return result;
+    }
+    
+void CCSXHHTMLContentParser::GenerateTOC2ListL(CCSXHGenericTOC1& 
+aGenericTOC1Object, RPointerArray<CCSXHHelpContentBase>* GenericTOC2List)
+    {
+    CCSXHXMLParseHandler_IndexFile* XMLParser = CCSXHXMLParseHandler_IndexFile::NewL(iCoeEnv);
+    CleanupStack::PushL(XMLParser);      
+    InitializeReaderL(XMLParser);
+        
+    XMLParser->SetArray(GenericTOC2List);
+    XMLParser->SetGenericTOC1Object(aGenericTOC1Object);
+    XMLParser->SetHtmlContentParserPtr(this);
+    RFs& FileSession = iCoeEnv->FsSession();
+    CCSXHHtmlTOC1* toc1 = STATIC_CAST(CCSXHHtmlTOC1*,&aGenericTOC1Object);
+    TBuf<KMaxFileName> lookupindexfile;
+    toc1->GetHelpFileL(lookupindexfile);
+    XMLParser->SetPath(lookupindexfile);
+    lookupindexfile.Append(KIndexFile);              
+ 
+    if(BaflUtils::FileExists(FileSession,lookupindexfile))
+        iXmlReader->ParseL (FileSession,lookupindexfile);
+    
+    TBuf<KMaxFileName>HelpContentName(toc1->GetName());
+    int toc1Count = iDuplicateHelpTopicList.Count();
+    
+     for(int i=0;i < toc1Count;i++)
+        {    
+        CCSXHHtmlTOC1* temptoc1 = iDuplicateHelpTopicList[i];
+            
+        if(temptoc1->GetName().CompareF(HelpContentName) == 0)
+            {    
+            TBuf<KMaxFileName> lookup;
+            temptoc1->GetHelpFileL(lookup);
+            XMLParser->SetPath(lookup);
+            lookup.Append(KIndexFile);              
+         
+            if(BaflUtils::FileExists(FileSession,lookup))
+                iXmlReader->ParseL (FileSession,lookup);
+            }
+        }
+    
+    CleanupStack::PopAndDestroy(XMLParser);
+    ClearReader();
+    }       
+        
+TAny* CCSXHHTMLContentParser::GetTopicContentL(CCSXHGenericTOC2* aTopic)
+    {
+    CCSXHHtmlTOC2* topic = STATIC_CAST(CCSXHHtmlTOC2*,aTopic);
+    TBuf<KMaxFileName> htmlFile;
+    topic->GetHtmlFileName(htmlFile);
+    return GetContentsFromFileL(htmlFile,iCoeEnv,iFeatureControl);
+    }
+    
+
+void CCSXHHTMLContentParser::ScanAndParseXMLfileToCreateTOC1ObjectL(
+        RFs& FileSession,
+        CDirScan* scanner,
+        CCSXHHelpDataBase* aDataBase,
+        const TInt& aDrive,
+        CCSXHXMLParseHandler_MetaFile* XMLParser
+        )
+    {
+    CDir* entryList = NULL;
+    scanner->NextL(entryList);
+    if (!entryList)
+        {
+        return;
+        }
+ 
+    CleanupStack::PushL(entryList);
+    
+    TInt entryCount = entryList->Count();     
+    TInt ROMDrive;
+    RFs::CharToDrive(PathInfo::RomRootPath()[0], ROMDrive);
+    TBuf<KMaxFileName> lookup;
+
+    while (entryCount--)
+        {
+        TEntry entry = (*entryList)[entryCount];
+        
+        //Clear the previous values
+        lookup.Delete(0, lookup.Length());
+        lookup.Append(scanner->FullPath());
+        lookup.Append(entry.iName); 
+        lookup.Append(KFwdSlash);
+        lookup.Append(KMetaFile);
+        
+        //Check whether a file exists        
+        if (!BaflUtils::FileExists(FileSession,lookup))
+            continue;
+        
+        TRAPD(parserResult, iXmlReader->ParseL(FileSession, lookup));
+        if (parserResult == KErrNone)
+            {
+            if (CheckFeatureIDL(XMLParser->GetFeatureIds()))
+                {            
+                if (!IsAppUIdPresentAlready(entry.iName))
+                    {
+                    TBool isRomBased = EFalse;
+                    TInt32 priority = XMLParser->Priority();
+                    
+                    // Now we take a walk if it's application helps (priority == 0)
+                    if ((priority != 0) 
+                        && ((aDrive == ROMDrive) || IsRomBasedContentL(FileSession, entry.iName)))
+                        {
+                        if (priority < KHighestPriority)
+                            {
+                            priority = KHighestPriority;
+                            }
+                        else if (priority > KLowestPriority)
+                            {
+                            priority = KLowestPriority;
+                            }
+                        
+                        isRomBased = ETrue;
+                        }
+                    else 
+                        {
+                        priority = 0;
+                        }
+                    
+                    CCSXHHtmlTOC1* categoryObj = CCSXHHtmlTOC1::NewL(XMLParser->GetApplicationName(), entry.iName, aDrive, 
+                            isRomBased ? KCSXHToc2ViewID : KCSXHToc2AppHelpsViewID, priority);
+                    if (!categoryObj->IsValid())
+                        {
+                        delete categoryObj;
+                        }
+                    else
+                        {
+                        CleanupStack::PushL(categoryObj);
+                        if (isRomBased)
+                            {
+                            if (aDataBase->GetMainTopics()->InsertChildWithPriority(categoryObj, EFalse))
+                                {
+                                iHtmlTOC1List.AppendL(categoryObj);
+                                }
+                            else
+                                {
+                                iDuplicateHelpTopicList.AppendL(categoryObj);
+                                }
+                            }
+                        else
+                            {
+                            if (aDataBase->GetAppHelpsTopics()->InsertChild(categoryObj, EFalse))
+                                {
+                                iHtmlTOC1List.AppendL(categoryObj);
+                                }
+                            else
+                                {
+                                iDuplicateHelpTopicList.AppendL(categoryObj);
+                                }
+                            }
+                        
+                        iIndexing->RuntimeGenerateIndexL(*categoryObj, XMLParser->GetFeatureIds());
+                        CleanupStack::Pop(categoryObj);
+                        }
+                    }
+                }         
+            }
+        }       
+
+    CleanupStack::PopAndDestroy(entryList);
+    }
+
+TBool CCSXHHTMLContentParser::IsRomBasedContentL( RFs& FileSession, const TDesC &aUid )
+    {
+#ifdef __WINSCW__
+    return ETrue;
+#endif
+    
+    TBool result = EFalse;
+    CDirScan* scanner=CDirScan::NewLC(FileSession);
+    TBuf<KMaxFileName> rootDir;
+    rootDir.Append( 'z' );
+                
+    if( GetHTMLContentPathForDriveL( &rootDir,iCoeEnv ) )
+        {
+        scanner->SetScanDataL(rootDir,KEntryAttDir|KEntryAttMatchExclusive,
+                                        ESortByName|EAscending, CDirScan::EScanDownTree);
+        CDir* entryList = NULL;
+        scanner->NextL(entryList);
+    
+        if ( !entryList )
+            {
+            CleanupStack::PopAndDestroy( scanner );
+            return EFalse;
+            }
+ 
+        TInt entryCount = entryList->Count();           
+    
+        while ( entryCount-- )
+            {
+            TEntry entry=(*entryList)[entryCount]; 
+            if ( ( entry.iName ).CompareC(aUid) == 0 )
+                {
+                result = ETrue;
+                break;
+                }
+            }
+        delete entryList;
+        }
+    
+    CleanupStack::PopAndDestroy( scanner );
+ 
+    return result;
+    }
+    
+void CCSXHHTMLContentParser::InsertHTMLToc1L(
+        const TDesC& aAppUidName,
+        const TDesC& aAppName, 
+        const TInt& aDrive,
+        CCSXHHelpDataBase* aDataBase, 
+        const TDesC& aFeatureIds, 
+        TInt32 aPriority
+        )
+    {
+    if (CheckFeatureIDL(aFeatureIds))
+        {
+        if (!IsAppUIdPresentAlready(aAppUidName)) 
+            {
+            // Now we take a walk if it's application helps (priority == 0)
+            CCSXHHtmlTOC1* categoryObj = CCSXHHtmlTOC1::NewL(aAppName,aAppUidName, aDrive,
+                    aPriority == 0 ? KCSXHToc2AppHelpsViewID : KCSXHToc2ViewID, aPriority);
+            
+            if (categoryObj->IsValid())
+                {
+                CleanupStack::PushL(categoryObj);
+                if (aPriority == 0)
+                    {
+                    if (aDataBase->GetAppHelpsTopics()->InsertChild(categoryObj, EFalse))
+                        {
+                        iHtmlTOC1List.AppendL(categoryObj);
+                        }
+                    else
+                        {
+                        iDuplicateHelpTopicList.AppendL(categoryObj);
+                        }
+                    }
+                else
+                    {
+                    if (aDataBase->GetMainTopics()->InsertChildWithPriority(categoryObj, EFalse))
+                        {
+                        iHtmlTOC1List.AppendL(categoryObj); //Keep a local copy*/
+                        }
+                    else
+                        {
+                        iDuplicateHelpTopicList.AppendL(categoryObj);
+                        }
+                    }
+                CleanupStack::Pop(categoryObj);
+                }
+            else
+                {
+                delete categoryObj;
+                }                    
+            }
+        }    
+    }
+    
+HBufC8* CCSXHHTMLContentParser::GetContentsFromFileL(const TDesC& htmlFile,CCoeEnv* aCoeEnv,
+            RFeatureControl& aFeatureControl) 
+    {
+    RFs& fileSession = aCoeEnv->FsSession();        
+    TInt SlashPosition = htmlFile.LocateReverse('\\');    
+    TBuf<KMaxFileName>* CompressedFile = new (ELeave) TBuf<KMaxFileName>; 
+    CleanupStack::PushL(CompressedFile); //1
+    CompressedFile->Copy(htmlFile.Mid(0,SlashPosition+1));
+    CompressedFile->Append(KContentZipFile);    
+    
+    HBufC8* CssContent = CreateBufferForCSSContentL(aFeatureControl);
+       
+    if(!BaflUtils::FileExists(fileSession,*CompressedFile))
+        {
+        CleanupStack::PopAndDestroy(CompressedFile);
+        
+        HBufC8* buffer = GetContentsFromHTMLFileL(htmlFile,aCoeEnv);
+        
+        return MergeCssAndHTMLContentL(buffer,CssContent);
+        }
+        
+    // Create an instance of CZipFile.
+    CZipFile* zipFile = CZipFile::NewL(fileSession, *CompressedFile);    
+    CleanupStack::PushL(zipFile); //2
+        
+    // Iterate and get the file name
+    CZipFileMemberIterator* members = zipFile->GetMembersL();
+    CleanupStack::PushL(members);//3
+    CZipFileMember* member = members->NextL(); // Get the first file in zip
+    
+    TInt nCount=0;    
+    const TBuf<KMaxFileName>*Fname;
+    TBuf<KMaxFileName> *HtmlFileName = new (ELeave) TBuf<KMaxFileName>;
+    CleanupStack::PushL(HtmlFileName); //4
+    HtmlFileName->Copy(htmlFile.Mid(SlashPosition+1));
+    for(nCount=0;member!=NULL;nCount++)
+        {         
+         Fname = member->Name();    
+         if(Fname->Compare(*HtmlFileName)==0 )
+            {
+            break;
+            }        
+        delete member;    
+        member = members->NextL();        
+        }
+
+    if(NULL == member)
+        {
+        CleanupStack::PopAndDestroy(HtmlFileName);
+        CleanupStack::PopAndDestroy(members);
+        CleanupStack::PopAndDestroy(zipFile);
+        CleanupStack::PopAndDestroy(CompressedFile);
+        
+        HBufC8* buffer = GetContentsFromHTMLFileL(htmlFile,aCoeEnv);
+        return MergeCssAndHTMLContentL(buffer,CssContent);
+        }
+        
+    CleanupStack::PushL(member);//5
+    RZipFileMemberReaderStream* stream;
+    zipFile->GetInputStreamL(member, stream);
+    CleanupStack::PushL(stream);//6
+        
+    // Extracts aFileName to a buffer.
+    // If the file is quite huge, then read the file in streaming mode.
+    // For example, use 4KB buffer and read it in an active object.
+    HBufC8* buffer = HBufC8::NewLC(member->UncompressedSize());//5
+    TPtr8 bufferPtr(buffer->Des());
+    User::LeaveIfError(stream->Read(bufferPtr, member->UncompressedSize()));
+
+    // Release all the resources.   
+    CleanupStack::Pop(buffer);
+    CleanupStack::PopAndDestroy(stream); 
+    CleanupStack::PopAndDestroy(member);
+    CleanupStack::PopAndDestroy(HtmlFileName);
+    CleanupStack::PopAndDestroy(members);
+    CleanupStack::PopAndDestroy(zipFile);
+    CleanupStack::PopAndDestroy(CompressedFile);
+    
+    return MergeCssAndHTMLContentL(buffer,CssContent);
+    }
+
+TBool CCSXHHTMLContentParser::HandleMasterKeywordFileL(CCSXHHelpDataBase* aDataBase)
+    {
+    RFs& FileSession = iCoeEnv->FsSession();
+    CCSXHXMLParseHandler_MasterKywd* XMLParser_MasterKywd = CCSXHXMLParseHandler_MasterKywd::NewL(iCoeEnv);  
+    CleanupStack::PushL(XMLParser_MasterKywd);  
+    InitializeReaderL(XMLParser_MasterKywd);
+    XMLParser_MasterKywd->SetHtmlContentParserPtr(this);
+    XMLParser_MasterKywd->SetDataBasePtr(aDataBase);
+    TBool bMasterKeywordFilePresent = EFalse;
+    
+    //Check for the availability of Master Keyword file
+    TBuf<KMaxFileName>* Master_kywdPath = new(ELeave) TBuf<KMaxFileName>;
+    CleanupStack::PushL(Master_kywdPath);//5
+    Master_kywdPath->Append(PathInfo::RomRootPath().Left(1));
+    GetHTMLContentPathForDriveL(Master_kywdPath,iCoeEnv);
+    Master_kywdPath->Append(KMasterKywdFile);
+    
+    if(BaflUtils::FileExists(FileSession,*Master_kywdPath))
+        {        
+        TRAP_IGNORE(iXmlReader->ParseL(FileSession,*Master_kywdPath ));
+        bMasterKeywordFilePresent = ETrue;
+        }    
+    
+    //KMasterKywdFile;
+    CleanupStack::PopAndDestroy(Master_kywdPath);
+    CleanupStack::PopAndDestroy(XMLParser_MasterKywd);
+    ClearReader();    
+    
+    return bMasterKeywordFilePresent;
+    }
+    
+void CCSXHHTMLContentParser::GenerateKywdTOC1ListL(CCSXHHelpDataBase* aDataBase)
+    {
+    if(!iHtmlTOC1List.Count())
+        return;
+    TBool bMasterKeywordFilePresent = HandleMasterKeywordFileL(aDataBase);
+    
+    CCSXHXMLParseHandler_Kywd* XMLParser = CCSXHXMLParseHandler_Kywd::NewL(iCoeEnv);  
+    CleanupStack::PushL(XMLParser);  
+    InitializeReaderL(XMLParser);
+    
+    XMLParser->SetDataBasePtr(aDataBase);
+    XMLParser->SetIsTOC2(EFalse);
+    XMLParser->SetHtmlContentParserPtr(this);
+    
+    //Parse keyword.xml file from Main Array list
+    ParseKeywdFileAndCreatekywdTOC1ObjectsL(iHtmlTOC1List,XMLParser,bMasterKeywordFilePresent);
+    
+    //Parse keyword.xml file from duplicate Array list
+    ParseKeywdFileAndCreatekywdTOC1ObjectsL(iDuplicateHelpTopicList,XMLParser,bMasterKeywordFilePresent);
+    
+    CleanupStack::PopAndDestroy(XMLParser);
+    ClearReader();
+    }
+    
+void CCSXHHTMLContentParser::GenerateTOC2ListForKeywordSearchL
+(CCSXHHelpDataBase* aDataBase,CCSXHKywdTOC1* aKywdTOC1Object)
+    {
+    RPointerArray<CCSXHHtmlTOC1>* TOC1HtmlList = aKywdTOC1Object->GetHtmlTOC1List();
+    if(!TOC1HtmlList)
+        return;
+    
+    CCSXHXMLParseHandler_Kywd* XMLParser = CCSXHXMLParseHandler_Kywd::NewL(iCoeEnv);
+    CleanupStack::PushL(XMLParser);      
+    InitializeReaderL(XMLParser);
+    
+    int toc1Count = TOC1HtmlList->Count();
+    CCSXHHtmlTOC1* toc1;
+
+    RFs& FileSession = iCoeEnv->FsSession();
+    
+    XMLParser->SetDataBasePtr(aDataBase);
+    XMLParser->SetIsTOC2(ETrue);
+    XMLParser->SetHtmlContentParserPtr(this);
+    
+    TBuf<KMaxFileName>* lookup = new(ELeave)TBuf<KMaxFileName>;
+    CleanupStack::PushL(lookup);//3
+    XMLParser->SetTOC1Title(aKywdTOC1Object->GetName());
+    for(int i = 0; i < toc1Count ; ++i )
+        {
+        toc1 = (*TOC1HtmlList)[i];
+        //Get Corresponding toc1 from Main array and set toc1 object
+        XMLParser->SetCurrentHtmlToc1(GetCorrespondingTOC1FromMainArray(toc1->GetName()));
+        //Clear the previous values
+        lookup->Delete(0,lookup->Length());
+        toc1->GetHelpFileL(*lookup);
+        XMLParser->SetPath(*lookup);
+        lookup->Append(KKeywordsFile);
+        TRAP_IGNORE(iXmlReader->ParseL (FileSession,*lookup ));
+        aDataBase->IncrementKeywordSearchCount();
+        }   
+    CleanupStack::PopAndDestroy(lookup);
+    CleanupStack::PopAndDestroy(XMLParser);  
+    ClearReader();
+    }
+    
+CCSXHHelpContentBase* CCSXHHTMLContentParser::GetContextTopicL( 
+        CCSXHHelpDataBase *aDataBase, 
+        TUid &aUid, 
+        TCoeContextName &aContextName
+        )
+    {
+    TBuf<KMaxFileName> path;
+    TInt32 toc1Count = iHtmlTOC1List.Count();
+    TInt32 dupToc1Count = iDuplicateHelpTopicList.Count();
+    CCSXHHtmlTOC1 *toc1 = NULL;
+    CCSXHHtmlTOC1 *temptoc1 = NULL;
+    TBool redirected = EFalse;
+    
+    for ( TInt32 i = 0; i < toc1Count; ++i )
+        {
+        toc1 = iHtmlTOC1List[i];
+        if ( aUid == toc1->GetAppUid() )
+            {
+            toc1->GetHelpFileL( path );
+            if ( IsRedirectedL( aDataBase, path, aUid, aContextName ) )
+                {
+                redirected = ETrue;
+                }
+            else
+                {
+                return toc1->GetContextTopic( aContextName );
+                }
+            break;
+            }
+        }
+    
+    if ( !redirected )
+        {
+        for ( TInt32 i = 0; i < dupToc1Count; ++i )
+            {
+            toc1 = iDuplicateHelpTopicList[i];
+            if ( aUid == toc1->GetAppUid() )
+                {
+                toc1->GetHelpFileL( path );
+                if ( IsRedirectedL( aDataBase, path, aUid, aContextName ) )
+                    {
+                    redirected = ETrue;
+                    }
+                else
+                    {
+                    temptoc1 = GetCorrespondingTOC1FromMainArray(toc1->GetName());                
+                    return temptoc1->GetContextTopic( aContextName );
+                    }
+                }
+            }
+        }
+        
+    if ( redirected )
+        {
+        for ( TInt32 i = 0; i < toc1Count; ++i )
+            {
+            toc1 = iHtmlTOC1List[i];
+            if ( aUid == toc1->GetAppUid() )
+                {    
+                return toc1->GetContextTopic( aContextName );
+                }
+            }
+        
+        for ( TInt32 i = 0; i < dupToc1Count; ++i )
+            {
+            toc1 = iDuplicateHelpTopicList[i];
+            if ( aUid == toc1->GetAppUid() )
+                {
+                temptoc1 = GetCorrespondingTOC1FromMainArray( toc1->GetName() );                
+                return temptoc1->GetContextTopic( aContextName );
+                }
+            }
+        }
+        
+    return NULL;
+    }
+    
+CCSXHHelpContentBase* CCSXHHTMLContentParser::GetHtmlTopicForUrlL(const TDesC& aUrl)
+    {
+    CCSXHHelpContentBase* tocobj = GetObjectBasedonUrlL(iHtmlTOC1List,aUrl,ETrue);
+    
+    if(NULL == tocobj)
+        tocobj = GetObjectBasedonUrlL(iDuplicateHelpTopicList,aUrl,EFalse);
+    
+    return tocobj;        
+    }
+
+CCSXHHelpContentBase* CCSXHHTMLContentParser::GetObjectBasedonUrlL(RPointerArray<CCSXHHtmlTOC1>& aTOC1ObjectsArray,
+        const TDesC& aUrl, TBool aMainArrayList)    
+    {
+        /*For URLs of form 
+        file:://<Drive Name>:/system/xhtml/<Lang ID>/<App UID>/Html name
+      We can have help topics for other cases, help topic objects not possible   
+    */
+    TBuf<KMaxFileName> aFileUrl;
+    
+    int toc1Count = aTOC1ObjectsArray.Count();
+    CCSXHHtmlTOC1* toc1,*temptoc1;
+    for(int j = 0; j < toc1Count; ++j)
+        {
+        toc1 = aTOC1ObjectsArray[j];
+        TBuf<KMaxFileName> htmlFile;
+        toc1->GetHelpFileL(htmlFile);
+        
+        //Convert fwd slashes to back slashes
+        TInt i = htmlFile.Find(KFwdSlash) ;
+        while (KErrNotFound != i)
+            {
+            htmlFile.Replace(i,1,KBackSlash);
+            i = htmlFile.Find(KFwdSlash) ;
+            }
+        
+        i = aUrl.FindC(htmlFile);
+        if(i != KErrNotFound)
+            {
+            TFileName fileName;
+            i = aUrl.LocateReverseF('/');
+            fileName = aUrl.Mid(i + 1);
+            if(aMainArrayList)
+                temptoc1 = toc1;
+            else
+                temptoc1 = GetCorrespondingTOC1FromMainArray(toc1->GetName());    
+            
+            return temptoc1->GetHtmlTopicForFile(fileName);
+            }
+        }
+    return NULL;    
+    }
+
+void CCSXHHTMLContentParser::GetHtmlFileL(CCoeEnv* coeEnv,const short& aDir,
+                                            const TAppUid& aUid,TBuf<KMaxFileName>& aFileName)
+    {
+    aFileName.Copy(KEmptyString);
+    
+    RFs& FileSession = coeEnv->FsSession();
+    TDriveList DirList; 
+    if( (FileSession.DriveList(DirList)<KErrNone) ||
+        (aDir >= DirList.Length()))
+        return; 
+    
+    TChar driveLetter = '?';
+    TDriveInfo info;
+    TInt error = FileSession.Drive(info, aDir);
+    if  ((error == KErrNone) && 
+        (DirList[aDir] && info.iType != EMediaNotPresent))
+        {
+        RFs::DriveToChar(aDir, driveLetter);
+
+        aFileName.Append(driveLetter);
+        GetHTMLContentPathForDriveL(&aFileName,coeEnv);
+        aUid.AppendUid(aFileName);
+        aFileName.Append(KFwdSlash);
+        }
+    }
+
+void CCSXHHTMLContentParser::InitializeReaderL(CCSXHXMLParseHandler* aXMLParser)
+    {
+    if(iXmlReader == NULL )
+        {       
+        iXmlReader = CSenXmlReader::NewL();
+        iXmlReader->SetContentHandler(*aXMLParser);
+        }
+    }
+void CCSXHHTMLContentParser::ClearReader()
+    {
+    delete iXmlReader;
+    iXmlReader = NULL;
+    }
+    
+TBool CCSXHHTMLContentParser::IsUidCategoryPresent(const TUid& aUid)
+    {
+    int toc1Count = iHtmlTOC1List.Count();
+    CCSXHHtmlTOC1* toc1;    
+    for(int i = 0; i < toc1Count; ++i)
+        {
+        toc1 = iHtmlTOC1List[i];
+        if(aUid == toc1->GetAppUid())
+            return ETrue;
+        }
+    
+    toc1Count = iDuplicateHelpTopicList.Count();
+    for(int i = 0; i < toc1Count; ++i)
+        {
+        toc1 = iDuplicateHelpTopicList[i];
+        if(aUid == toc1->GetAppUid())
+            return ETrue;
+        }    
+    return EFalse;  
+    }
+
+TBool CCSXHHTMLContentParser::GetHTMLToc1(const TDesC& aUid,CCSXHXMLParseHandler* aParser)
+    {
+    TUint AppId;
+    
+    if(!aUid.Length())
+        return EFalse;
+
+    TLex FolderUid(aUid.Mid(KOffset));
+    FolderUid.Val(AppId,EHex);
+    TUid ApplicationUid = TUid::Uid((TInt)AppId);
+    
+    int toc1Count = iHtmlTOC1List.Count();
+    
+    CCSXHHtmlTOC1* toc1;    
+    for(int i = 0; i < toc1Count; ++i)
+        {
+        toc1 = iHtmlTOC1List[i];
+        if(ApplicationUid == toc1->GetAppUid())
+            {
+            STATIC_CAST(CCSXHXMLParseHandler_MasterKywd*,aParser)->SetCurrentHtmlToc1(toc1); 
+            return ETrue;
+            }            
+        }
+    
+    toc1Count = iDuplicateHelpTopicList.Count();            
+    for(int i = 0; i < toc1Count; ++i)
+        {
+        toc1 = iDuplicateHelpTopicList[i];
+        if(ApplicationUid == toc1->GetAppUid())
+            {
+            STATIC_CAST(CCSXHXMLParseHandler_MasterKywd*,aParser)->SetCurrentHtmlToc1(toc1); 
+            return ETrue;
+            }            
+        }
+                
+    return EFalse;  
+    }
+
+//To get Corresponding toc1 from main array.
+CCSXHHtmlTOC1* CCSXHHTMLContentParser::GetCorrespondingTOC1FromMainArray(const TDesC& aApplicationName)
+    {
+    TInt toc1Count = iHtmlTOC1List.Count();
+    CCSXHHtmlTOC1* toc1;
+    for(int i=0;i<toc1Count;++i)
+        {
+        toc1 = iHtmlTOC1List[i];
+        if(toc1->GetName().CompareF(aApplicationName) == 0)
+            return toc1;
+        }
+    
+    return NULL;
+    }
+
+//Check UId is already present in the list.    
+TBool CCSXHHTMLContentParser::IsAppUIdPresentAlready(const TDesC& aUid)
+    {
+    TBool result = EFalse;
+    TInt toc1Count = iHtmlTOC1List.Count();
+    CCSXHHtmlTOC1* toc1;
+    
+    TUint AppId;
+    TLex FolderUid(aUid.Mid(KOffset));
+    FolderUid.Val(AppId,EHex);
+    TUid ApplicationUid = TUid::Uid((TInt)AppId);
+    
+    for(int i=0;i<toc1Count;++i)
+        {
+        toc1 = iHtmlTOC1List[i];
+        if(ApplicationUid == toc1->GetAppUid())
+            {
+            result = ETrue;
+            break;
+            }            
+        }
+        
+    toc1Count =    iDuplicateHelpTopicList.Count();    
+    for(int i=0;i<toc1Count;++i)
+        {
+        toc1 = iDuplicateHelpTopicList[i];
+        if(ApplicationUid == toc1->GetAppUid())
+            {
+            result = ETrue;
+            break;
+            }
+        }        
+        
+    return result;    
+
+    }
+    
+void CCSXHHTMLContentParser::ParseKeywdFileAndCreatekywdTOC1ObjectsL(
+        RPointerArray<CCSXHHtmlTOC1>& aTOC1ObjectsArray,
+        CCSXHXMLParseHandler_Kywd* XMLParser, TBool bMasterKeywordFilePresent)
+    {
+    int toc1Count = aTOC1ObjectsArray.Count();
+    CCSXHHtmlTOC1* toc1;
+     
+    TBuf<KMaxFileName>* lookup = new(ELeave)TBuf<KMaxFileName>;
+    CleanupStack::PushL(lookup);//1
+    
+    RFs& FileSession = iCoeEnv->FsSession();
+    
+        for(int i = 0; i < toc1Count; ++i)
+        {
+        toc1 = aTOC1ObjectsArray[i];
+        
+        if(bMasterKeywordFilePresent && toc1->IsROMDrive())
+            continue;
+        
+        //Clear the previous values
+        lookup->Delete(0,lookup->Length());
+        
+        toc1->GetHelpFileL(*lookup);
+        lookup->Append(KKeywordsFile);
+        
+          //Check whether a file exists        
+        if(!BaflUtils::FileExists(FileSession,*lookup))
+            continue;
+        
+        XMLParser->SetCurrentHtmlToc1(toc1);
+        TRAP_IGNORE(iXmlReader->ParseL(FileSession,*lookup ));
+        }
+
+    CleanupStack::PopAndDestroy(lookup);  
+    }
+
+//RUNTIME
+void CCSXHHTMLContentParser::GetSupportedFeatureListL()
+    {
+    RFeatureUidArray SupportedFeatures;    
+    TInt err = iFeatureControl.Connect();
+    if ( err == KErrNone )
+        {
+         // ListSupportedFeatures() returns one of the Symbian error codes.
+         err = iFeatureControl.ListSupportedFeatures( SupportedFeatures );
+             
+         // Remember to call CloseL after using RFeatureControl.
+         // It disconnects the Feature Manager server.
+         iFeatureControl.Close();  
+        }
+    //As per new req. add true, flase to id and create an array.
+    
+    iFeatureManager_FeatureIds = new (ELeave) CDesCArrayFlat(2); 
+    
+    TBuf<25>CurrFId;
+    
+    for(TInt i=0;i<SupportedFeatures.Count();i++)
+        {
+        CurrFId.Copy(KEmptyString);    
+        CurrFId.AppendNum(SupportedFeatures[i].iUid);
+        iFeatureManager_FeatureIds->AppendL(CurrFId);
+        
+        CurrFId.Copy(KTrue_StringtoAppend);    
+        CurrFId.AppendNum(SupportedFeatures[i].iUid);
+        iFeatureManager_FeatureIds->AppendL(CurrFId);
+        
+        CurrFId.Copy(KFalse_StringtoAppend);    
+        CurrFId.AppendNum(SupportedFeatures[i].iUid);
+        iFeatureManager_FeatureIds->AppendL(CurrFId);        
+        }
+        
+    //Input Language variation changes
+    //-----------------------------------------
+    //Create an array with supported input language        
+    CPtiEngine* ptiEngine = CPtiEngine::NewL();
+    CleanupStack::PushL( ptiEngine );
+    
+    CArrayFix<TInt>* languageCodeArray = new(ELeave)CArrayFixFlat<TInt>(2);
+    
+    ptiEngine->GetAvailableLanguagesL( languageCodeArray );
+    
+    TInt nCount = languageCodeArray->Count();
+    
+    iSupportedInputLanguages = new (ELeave) CDesCArrayFlat(2); 
+    
+    //Codescanner gives error, if member variables are pushed.
+    //CleanupStack::PushL( iSupportedInputLanguages );
+    
+    for(TInt i=0; i<nCount;i++)
+        {
+        TInt languageCode = languageCodeArray->At(i);
+        TBuf<25>Currlang(_L("LANGUAGE_"));
+        if(languageCode < 10)
+            Currlang.AppendNumFixedWidth(languageCode,EDecimal,2);
+        else
+            Currlang.AppendNum(languageCode);
+        
+        iSupportedInputLanguages->AppendL(Currlang);
+        }
+    
+    //CleanupStack::Pop(iSupportedInputLanguages);    
+    CleanupStack::PopAndDestroy( ptiEngine );
+    
+    delete languageCodeArray;    
+    //-----------------------------------------
+    
+    SupportedFeatures.Close();
+    }
+    
+//RUNTIME
+TBool CCSXHHTMLContentParser::CheckFeatureIDL(const TDesC& aFeatureIds)
+    {
+    if(/*KHexPrefixLength == aFeatureIds.Length() &&*/ 
+        KErrNotFound != aFeatureIds.Find(KDefaultFeatureIdStringTemp))
+        {
+        return ETrue;
+        }
+            
+    HBufC* Ids = HBufC::NewLC(aFeatureIds.Length());    
+    TPtr CurrentFeatureIds = Ids->Des();    
+    CurrentFeatureIds.Copy(aFeatureIds);
+    CleanupStack::Pop(Ids);
+        
+    CDesCArray* FeatureIdList = new (ELeave) CDesCArrayFlat(2); ;
+    TInt EndPos = CurrentFeatureIds.Locate(' ');
+    
+    CleanupStack::PushL(FeatureIdList);
+                
+    while (KErrNotFound != EndPos)
+        {
+                FeatureIdList->AppendL(CurrentFeatureIds.Mid(0,EndPos));// FId_Val);            
+        CurrentFeatureIds = CurrentFeatureIds.Mid(EndPos+1);
+        EndPos = CurrentFeatureIds.Locate(' ') ;
+        }
+
+    if(KErrNotFound == EndPos && 0!= CurrentFeatureIds.Length())
+        {
+        FeatureIdList->AppendL(CurrentFeatureIds);
+        }    
+    
+    CleanupStack::Pop(FeatureIdList); 
+     
+    TInt position;        
+    if(KErrNone == FeatureIdList->Find(KDefaultFeatureIdString,position) || 
+       KErrNone == FeatureIdList->Find(KDefaultFeatureIdStringTemp,position) )
+        {
+        delete FeatureIdList;
+        delete Ids;
+        return ETrue;
+        }
+        
+    TInt nCount = FeatureIdList->MdcaCount();
+    
+    
+    //FeatureManager list contains all enabled featureIds, appended with true, and false.
+    //New Req. text associated with true_featureId, should be displayed, if Id is enabled.
+    //else, if featureId is disabled, text associated with false_featureId should be displayed. 
+    // 1. if featureId string contains "false" and it is not in the list, return ETrue.
+    // 2. if featureId string does not contain "false" and it is present in the list, return ETrue.
+    // 3. if featureId is part of input language, return ETrue.
+    for(TInt j=0;j < nCount;j++)
+        {
+        if(
+            (KErrNotFound != FeatureIdList->MdcaPoint(j).Find(KFalseString) &&
+            KErrNone != iFeatureManager_FeatureIds->Find(FeatureIdList->MdcaPoint(j),position))||
+        
+            (KErrNotFound == FeatureIdList->MdcaPoint(j).Find(KFalseString) &&
+            KErrNone == iFeatureManager_FeatureIds->Find(FeatureIdList->MdcaPoint(j),position)) ||
+        
+            KErrNone == iSupportedInputLanguages->Find(FeatureIdList->MdcaPoint(j),position)
+        )                        
+            {
+            delete FeatureIdList;
+            delete Ids;
+            return ETrue;
+            }        
+        }
+                
+    delete Ids;        
+    delete FeatureIdList;    
+    return EFalse;        
+    }    
+    
+HBufC8* CCSXHHTMLContentParser::CreateBufferForCSSContentL(RFeatureControl& aFeatureControl)
+    {    
+    RFeatureUidArray SupportedFeatures;
+    TInt err = aFeatureControl.Connect();
+    if ( err == KErrNone )
+        {
+         // ListSupportedFeatures() returns one of the Symbian error codes.
+         err = aFeatureControl.ListSupportedFeatures( SupportedFeatures );
+             
+         // Remember to call CloseL after using RFeatureControl.
+         // It disconnects the Feature Manager server.
+         aFeatureControl.Close();                    
+        }
+    
+        //Input Language variation changes
+    //-----------------------------------------
+
+    CPtiEngine* ptiEngine = CPtiEngine::NewL();
+    CleanupStack::PushL( ptiEngine );
+
+    CArrayFix<TInt>* languageCodeArray = new(ELeave)CArrayFixFlat<TInt>(2);
+
+    ptiEngine->GetAvailableLanguagesL( languageCodeArray );
+    
+    TInt nInputLangCount = languageCodeArray->Count();
+    TInt nCount = SupportedFeatures.Count();    
+
+    HBufC8* CssContent = HBufC8::NewLC(nCount * KMaxUnits * 6 + nInputLangCount * 3 + 400);
+    TPtr8 bufferPtr(CssContent->Des());
+    
+    AppendStyleSheetContent_listitem(bufferPtr,nCount,SupportedFeatures,*languageCodeArray);
+    AppendStyleSheetContent_paragraph(bufferPtr,nCount,SupportedFeatures,*languageCodeArray);
+    AppendStyleSheetContent_ahref(bufferPtr,nCount,SupportedFeatures,*languageCodeArray);
+    AppendStyleSheetContent_none(bufferPtr,nCount,SupportedFeatures);    
+        
+    SupportedFeatures.Close();                
+    
+    CleanupStack::Pop(CssContent);    
+    
+    //Input Language variation changes
+    //-----------------------------------------
+    CleanupStack::PopAndDestroy( ptiEngine );    
+
+    delete languageCodeArray;
+    //-----------------------------------------
+
+    return CssContent;
+    }
+    
+HBufC8* CCSXHHTMLContentParser::GetContentsFromHTMLFileL(const TDesC& htmlFile,CCoeEnv* aCoeEnv)
+    {
+    RFs& fsSession = aCoeEnv->FsSession();             
+    RFile file; 
+        
+    TInt err = file.Open(fsSession,htmlFile,EFileRead|EFileShareReadersOrWriters);
+    if(KErrNone == err)
+        {
+        TInt FileSize;
+        HBufC8* htmlFileContent = NULL;
+        if(KErrNone == file.Size(FileSize))
+            {
+            htmlFileContent = HBufC8::NewLC(FileSize);
+            TPtr8 PtrContent = htmlFileContent->Des();
+            
+            file.Read(PtrContent);    
+            CleanupStack::Pop(htmlFileContent);                
+            }        
+        file.Close();
+        return htmlFileContent;
+        }
+    else
+        {        
+        return NULL;
+        }
+    }
+    
+HBufC8* CCSXHHTMLContentParser::MergeCssAndHTMLContentL(HBufC8* aHTMLBuffer, HBufC8* aCssContent)
+    {
+    TInt BufferLength=0;
+    if(aHTMLBuffer)
+        BufferLength = aHTMLBuffer->Size();
+    
+    if(aCssContent)
+        BufferLength += aCssContent->Size();
+    
+    HBufC8* Htmlbuffer = HBufC8::NewLC(BufferLength);
+    
+    TPtr8 HtmlbufferPtr(Htmlbuffer->Des());
+    
+    if(aCssContent)
+        {
+        HtmlbufferPtr.Copy(aCssContent->Des());
+        delete aCssContent;
+        }
+        
+    if(aHTMLBuffer)
+        {
+        HtmlbufferPtr.Append(aHTMLBuffer->Des());
+        delete aHTMLBuffer;    
+        }
+    
+    if(Htmlbuffer)
+        CleanupStack::Pop(Htmlbuffer);
+    
+    return Htmlbuffer;    
+    }
+
+void CCSXHHTMLContentParser::AppendStyleSheetContent_listitem(TPtr8& abufferptr,TInt aFeatureIdCount,
+                                                    RFeatureUidArray& aSupportedFeatures,
+                                                    CArrayFix<TInt>& alanguageCodeArray)
+    {
+    //List Items
+    //---------------------------------------------------------
+    abufferptr.Copy(KCsstext_First);
+    
+    for(TInt i=0;i<aFeatureIdCount;++i)
+        {
+        TBuf<KMaxFileName> FeatureId;
+        FeatureId.Format(KtextFormat_true_l,aSupportedFeatures[i].iUid);
+        //FeatureId.Append(KComma);
+        abufferptr.Append(FeatureId);        
+        }
+        
+    for(TInt i=0;i<alanguageCodeArray.Count();++i)
+        {
+        TBuf<KMaxFileName> FeatureId;
+        if(alanguageCodeArray[i] < 10)
+            FeatureId.Format(KtextFormat_lang_0l,alanguageCodeArray[i]);
+        else
+            FeatureId.Format(KtextFormat_lang_l,alanguageCodeArray[i]);
+        
+        abufferptr.Append(FeatureId);        
+        }
+        
+    abufferptr.Append(KDefaultFeatureId);        
+    abufferptr.Append(KCsstext_displayp_li);        
+    abufferptr.Append(KCsstext_Last);
+    //---------------------------------------------------------
+    }
+
+void CCSXHHTMLContentParser::AppendStyleSheetContent_paragraph(TPtr8& abufferptr,TInt aFeatureIdCount,
+                                                    RFeatureUidArray& aSupportedFeatures,
+                                                    CArrayFix<TInt>& alanguageCodeArray)
+    {
+    //Paragraph
+    //---------------------------------------------------------
+    abufferptr.Append(KCsstext_First);
+    for(TInt i=0;i<aFeatureIdCount;++i)
+        {
+        TBuf<KMaxFileName> FeatureId;
+        FeatureId.Format(KtextFormat_true_b,aSupportedFeatures[i].iUid);
+        //FeatureId.Append(KComma);
+        
+        abufferptr.Append(FeatureId);        
+        }
+        
+    for(TInt i=0;i<alanguageCodeArray.Count();++i)
+        {
+        TBuf<KMaxFileName> FeatureId;
+        if(alanguageCodeArray[i] < 10)
+            FeatureId.Format(KtextFormat_lang_0b,alanguageCodeArray[i]);
+        else
+            FeatureId.Format(KtextFormat_lang_b,alanguageCodeArray[i]);
+        
+        abufferptr.Append(FeatureId);        
+        }
+        
+    abufferptr.Append(KDefaultFeatureId);
+    abufferptr.Append(KCsstext_displayp_p);        
+    abufferptr.Append(KCsstext_Last);
+    
+    //---------------------------------------------------------
+    }
+
+void CCSXHHTMLContentParser::AppendStyleSheetContent_ahref(TPtr8& abufferptr,TInt aFeatureIdCount,
+                                                RFeatureUidArray& aSupportedFeatures,
+                                                CArrayFix<TInt>& alanguageCodeArray)
+    {
+    //A href
+    //---------------------------------------------------------
+    abufferptr.Append(KCsstext_First);
+    for(TInt i=0;i<aFeatureIdCount;++i)
+        {
+        TBuf<KMaxFileName> FeatureId;
+        FeatureId.Format(KtextFormat_true_a,aSupportedFeatures[i].iUid);        
+        abufferptr.Append(FeatureId);        
+        }
+    
+    for(TInt i=0;i<alanguageCodeArray.Count();++i)
+        {
+        TBuf<KMaxFileName> FeatureId;
+        if(alanguageCodeArray[i] < 10)
+            FeatureId.Format(KtextFormat_lang_0a,alanguageCodeArray[i]);
+        else
+            FeatureId.Format(KtextFormat_lang_a,alanguageCodeArray[i]);
+        abufferptr.Append(FeatureId);        
+        }
+        
+    abufferptr.Append(KDefaultFeatureId);
+    abufferptr.Append(KCsstext_displayp_a);        
+    abufferptr.Append(KCsstext_Last);
+    
+    //---------------------------------------------------------
+    }
+
+void CCSXHHTMLContentParser::AppendStyleSheetContent_none(TPtr8& abufferptr,TInt aFeatureIdCount,
+                                                    RFeatureUidArray& aSupportedFeatures
+                                                    )
+    {
+    //False
+    //---------------------------------------------------------
+    abufferptr.Append(KCsstext_First);
+    for(TInt i=0;i<aFeatureIdCount;++i)
+        {
+        TBuf<KMaxFileName> FeatureId;
+        FeatureId.Format(KtextFormat_false,aSupportedFeatures[i].iUid,aSupportedFeatures[i].iUid,aSupportedFeatures[i].iUid);
+        abufferptr.Append(FeatureId);        
+        }
+        
+    abufferptr.Append(KDefaultFeatureId);
+    abufferptr.Append(KCsstext_displayp_n);        
+    abufferptr.Append(KCsstext_Last);
+    
+    //---------------------------------------------------------
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHHelpContentBase.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHHelpContentBase class definition
+*
+*/
+
+#include "CSXHHelpContentBase.h"
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHHelpContentBase::~CCSXHHelpContentBase()
+    {
+    delete iName;
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+EXPORT_C  TPtr CCSXHHelpContentBase::GetName() const
+    {
+    return iName->Des();
+    }
+
+TInt32 CCSXHHelpContentBase::Priority() const 
+	{
+	return iPriority;
+	}
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHHelpContentBase::CCSXHHelpContentBase(const TDesC& name, const TInt32 aPriority) 
+                      : iName(name.Alloc()), iPriority(aPriority)
+    {//No implementation required
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHHelpDataBase.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,276 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHHelpDataBase class definition
+*
+*/
+
+#include "CSXHHelpDataBase.h"
+#include "CSXHHTMLContentParser.h"
+#include "CSXHLegacyContentParser.h"
+#include "CSXHViewIDs.h"
+#include "CSXHGenericTOC2.h"
+#include "CSXHKywdTOC1.h"
+#include "CSXHMainTopics.h"
+#include "CSXHKywdTopics.h"
+#include "CsHelpCmdLineParser.h"
+#include "CSXHContextTopic.h"
+#include "coehelp.h" 
+
+#include <eikprogi.h>
+#include <utf.h>
+#include <bautils.h>
+#include <data_caging_path_literals.hrh>
+#include <eikenv.h> 
+#include <eikprogi.h>
+
+
+#include <AknProgressDialog.h>
+
+EXPORT_C CCSXHHelpDataBase* CCSXHHelpDataBase::NewL(CCoeEnv* aCoeEnv,
+	const TApaAppCaption& aAppCaption, const TApaAppCaption& aAppHelpTopic)
+    {
+    CCSXHHelpDataBase* self = CCSXHHelpDataBase::NewLC(aCoeEnv,aAppCaption, aAppHelpTopic);
+    CleanupStack::Pop(self);
+    return self;    
+    }
+
+CCSXHHelpDataBase* CCSXHHelpDataBase::NewLC(CCoeEnv* aCoeEnv, const TApaAppCaption& aAppCaption, const TApaAppCaption& aAppHelpTopic)
+    {
+    CCSXHHelpDataBase *self = NULL;
+    //Add stuff into TLS
+    if(Dll::Tls() == NULL )
+        {
+        // TLS is still null, which means that no Singleton has
+        // been instantiated yet. Do so now, and return that
+        // instance:
+        // Store a pointer to the new instance in thread local storage:
+        self = new(ELeave) CCSXHHelpDataBase(aCoeEnv,aAppCaption, aAppHelpTopic);
+        CleanupStack::PushL(self);
+        self->ConstructL();
+     
+        TInt err = Dll::SetTls(self);
+        if (err != KErrNone)
+            {
+            CleanupStack::Pop(self);            
+            delete self;
+            self = NULL;
+            User::Leave(err);
+            }
+        }
+     else
+        {
+        self = GetInstance();
+        }
+
+    return self;
+    }
+    
+CCSXHHelpDataBase* CCSXHHelpDataBase::GetInstance()
+    {
+    // Singleton has been instantiated once already, so return
+    // that instance:
+    return static_cast<CCSXHHelpDataBase*>(Dll::Tls());
+    }
+
+CCSXHHelpDataBase::CCSXHHelpDataBase(CCoeEnv* aCoeEnv, const TApaAppCaption& aAppCaption, const TApaAppCaption& aAppHelpTopic)
+             : iCoeEnv(aCoeEnv), iAppCaption(aAppCaption), iAppHelpTopic(aAppHelpTopic), iKeywordSearchCount(0)
+             
+    {
+    }
+
+CCSXHHelpDataBase::~CCSXHHelpDataBase()
+    {
+    delete iMainTOC1;
+    delete iKywdTOC1;
+    delete iLastContextTopic;   
+    delete iHTMLContentParser;
+    delete iLegacyContentParser;
+    Dll::SetTls( NULL );
+    }
+
+void CCSXHHelpDataBase::ConstructL()
+    {
+    iHTMLContentParser = CCSXHHTMLContentParser::NewL(iCoeEnv);
+    iLegacyContentParser = CCSXHLegacyContentParser::NewL(this);
+    
+    iMainTOC1 = CCSXHMainTopics::NewL(KCSXHToc1ViewID,iAppCaption);
+    iKywdTOC1 = CCSXHKywdTopics::NewL(iAppCaption);
+    
+    //No need to delete iAppHelpsToc in destruct,
+    //because it will be deleted when deleting iMainTOC1.
+    //All third-party helps will be put to this topic
+    TInt appHelpPriority = 20001;
+    iAppHelpsToc = CCSXHMainTopics::NewL( KCSXHToc1AppHelpsViewID, iAppHelpTopic, appHelpPriority );
+        
+    //Build the TOC1 list here
+    iMainTOC1->InsertChildWithPriority(iAppHelpsToc, EFalse);
+    iHTMLContentParser->GenerateTOC1ListL(this);
+    iLegacyContentParser->GenerateTOC1ListL(this);
+    }
+    
+CCoeEnv* CCSXHHelpDataBase::GetCoeEnv()
+    {
+    return iCoeEnv;
+    }
+
+EXPORT_C CCSXHGenericTOC1* CCSXHHelpDataBase::GetMainTopics()
+    {
+    return iMainTOC1;   
+    }
+EXPORT_C CCSXHGenericTOC1* CCSXHHelpDataBase::GetKywdTopics()
+    {
+    return iKywdTOC1;
+    }
+
+EXPORT_C CCSXHGenericTOC1* CCSXHHelpDataBase::GetAppHelpsTopics()
+    {
+    return iAppHelpsToc;   
+    }
+
+EXPORT_C CCSXHHelpContentBase* CCSXHHelpDataBase::GetContextTopic(const TDesC8& aContextMessage)
+    {
+    TRAP_IGNORE(GetContextTopicL(aContextMessage));
+    return iLastContextTopic;
+    
+    }
+CCSXHHelpContentBase* CCSXHHelpDataBase::GetContextTopicL(const TDesC8& aContextMessage)
+    {
+    if(iLastContextTopic)
+        {
+        delete iLastContextTopic;
+        iLastContextTopic = NULL;
+        }
+    //TSW Error Correction:Help: Application crashes 
+    //after trying to re-open context-dependent help from application
+    //Clear childlist of all (TOC1)parents.    
+	ClearAllTOC1Contents();    
+	
+    CArrayFix<TCoeHelpContext>* contextList;
+    CCsHlpCmdLineParser* parser = new(ELeave) CCsHlpCmdLineParser;
+    CleanupStack::PushL(parser);
+    parser->ConstructL(aContextMessage);
+    contextList = parser->ContextListL();
+    CleanupStack::PopAndDestroy(parser); // parser
+    CleanupStack::PushL(contextList);
+    CCSXHHelpContentBase* contextTopic;
+    TInt numberOfContextList = contextList->Count();
+    TCoeHelpContext* context;
+    for (TInt i(0); i < numberOfContextList; i++)
+        {
+        context = &(contextList->At(i));
+        
+        contextTopic = iHTMLContentParser->GetContextTopicL(this, context->iMajor,context->iContext);
+        if(contextTopic)
+            {
+            CleanupStack::PopAndDestroy(contextList);
+            iLastContextTopic = CCSXHContextTopic::NewL(contextTopic);
+            return iLastContextTopic;
+            }
+        }
+
+    for (TInt i(0); i < numberOfContextList; i++)
+        {
+        context = &(contextList->At(i));
+        
+        contextTopic = iLegacyContentParser->GetContextTopic(*context);
+        if(contextTopic)
+            {
+            CleanupStack::PopAndDestroy(contextList);
+            iLastContextTopic = CCSXHContextTopic::NewL(contextTopic);
+            return iLastContextTopic;
+            }
+        }
+        
+        
+    CleanupStack::PopAndDestroy(contextList);    
+    return NULL;
+    }
+
+EXPORT_C void CCSXHHelpDataBase::ClearAllTOC1Contents()
+    {
+    iMainTOC1->ResetChildList();
+    iKywdTOC1->ResetChildList();
+    }
+
+CCSXHLegacyContentParser* CCSXHHelpDataBase::GetLegacyParser() 
+    {
+    return iLegacyContentParser;        
+    }
+    
+CCSXHHTMLContentParser* CCSXHHelpDataBase::GetHtmlParser() 
+    {
+    return iHTMLContentParser;      
+    }
+
+void CCSXHHelpDataBase::InsertKeywordL(const TDesC& aKywdName, 
+	TInt aLegacyKywdIndex, const TUid& aCatUid)
+    {
+    if(!iHTMLContentParser->IsUidCategoryPresent(aCatUid))
+        iKwydBuilder->InsertKeywordL(iKywdTOC1,aKywdName,aLegacyKywdIndex);
+    }
+    
+void CCSXHHelpDataBase::InsertKeywordL(const TDesC& aKywdName, CCSXHHtmlTOC1* aToc1)
+    {
+    iKwydBuilder->InsertKeywordL(iKywdTOC1,aKywdName,aToc1);
+    }
+
+CCSXHKywdTOC1* CCSXHHelpDataBase::InsertKeywordTopicL(CCSXHGenericTOC2* aToc2)
+    {
+    CCSXHKywdTOC1* toc1 = iKywdTOC1->GetSelectedTopic();
+    InsertKeywordTopic(toc1,aToc2);
+    return toc1;
+    }
+    
+void CCSXHHelpDataBase::InsertKeywordTopic(CCSXHKywdTOC1* aToc1, CCSXHGenericTOC2* aToc2)
+    {
+    aToc1->InsertChild(aToc2);
+    }
+
+EXPORT_C TInt CCSXHHelpDataBase::InitGenerateKeywordTOC2ListL(CCSXHKywdTOC1* aTopic)
+    {
+    iKeywordSearchCount = 0;
+    RPointerArray<CCSXHHtmlTOC1>* TOC1HtmlList = aTopic->GetHtmlTOC1List();
+    TInt htmlCount = TOC1HtmlList ? TOC1HtmlList->Count() : 0;
+    TInt legacyCount = iLegacyContentParser->InitGenerateTOC2ListForKeywordSearchL(aTopic);
+    return (htmlCount + legacyCount);
+    }
+    
+void CCSXHHelpDataBase::GenerateKeywordTOC2ListL(CCSXHKywdTOC1* aTopic)
+    {
+    iHTMLContentParser->GenerateTOC2ListForKeywordSearchL(this,aTopic);
+ 	iLegacyContentParser->GenerateTOC2ListForKeywordSearchL(aTopic);
+    }
+    
+EXPORT_C CCSXHHelpContentBase* CCSXHHelpDataBase::GetHtmlTopicForUrlL(const TDesC& url)
+    {
+    return iHTMLContentParser->GetHtmlTopicForUrlL(url);
+    }
+void CCSXHHelpDataBase::FillKeywordTopicsL(MCSXHKywdBuilder* aBuilder)
+    {
+    iKwydBuilder = aBuilder;
+    iHTMLContentParser->GenerateKywdTOC1ListL(this);
+    iLegacyContentParser->GenerateKywdTOC1ListL(this);
+    }
+    
+
+void CCSXHHelpDataBase::IncrementKeywordSearchCount(TInt aUnits)
+	{
+	iKeywordSearchCount += aUnits;
+	}
+
+EXPORT_C TInt CCSXHHelpDataBase::GetKeywordSearchCount()
+	{
+	return iKeywordSearchCount;
+	}
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHHtmlTOC1.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,208 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHHtmlTOC1 class definition
+*
+*/
+
+#include "CSXHHtmlTOC1.h"
+#include "CSXHHtmlTOC2.h"
+#include "CSXHViewIDs.h"
+#include "CSXHHTMLContentParser.h"
+#include "CSXHHelpDataBase.h"
+#include "csxhconstants.h"
+
+#include <eikenv.h> 
+#include <utf.h>
+#include <data_caging_path_literals.hrh>
+#include <zipfile.h>
+#include <bautils.h>
+#include <SenXmlReader.h> 
+#include <f32file.h>
+#include <pathinfo.h>
+
+const TInt KBufSize = 35;
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHHtmlTOC1* CCSXHHtmlTOC1::NewL(const TDesC& aName, const TDesC& aFolder,const TInt& aDrive, TUid aViewId, TInt32 aPriority)
+    {
+    CCSXHHtmlTOC1* self = new (ELeave) CCSXHHtmlTOC1(aName, aFolder, aDrive, aViewId, aPriority);
+    return self;
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHHtmlTOC1::CCSXHHtmlTOC1(const TDesC& aName, const TDesC& aFolder,const TInt& aDrive, TUid aViewId, TInt32 aPriority):
+                    CCSXHGenericTOC1(aName, aPriority), iAppUid(aFolder), iDrive(aDrive), iViewId(aViewId)
+    {//No implementation required
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHHtmlTOC1::~CCSXHHtmlTOC1()
+    {//No implementation required
+    }   
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+TUid CCSXHHtmlTOC1::GetViewID() const
+    {
+    return iViewId;
+    }
+    
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+void CCSXHHtmlTOC1::GetHelpFileL(TBuf<KMaxFileName>&  aFileName ) const
+    {
+    //return iHelpFile;
+    return CCSXHHTMLContentParser::GetHtmlFileL(
+                CCSXHHelpDataBase::GetInstance()->GetCoeEnv(),iDrive,iAppUid,aFileName);
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+const TUid& CCSXHHtmlTOC1::GetAppUid() const
+    {
+    return iAppUid.GetUid();
+    }
+    
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+TBool CCSXHHtmlTOC1::IsROMDrive() 
+    {
+    TInt ROMDrive;
+    RFs::CharToDrive( PathInfo::RomRootPath()[0], ROMDrive );
+    if(ROMDrive == iDrive)
+    	return ETrue;
+    else
+    	return EFalse;
+    }
+    
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHHelpContentBase* CCSXHHtmlTOC1::GetContextTopic(const TDesC&  contextName)
+    {
+    TBool resetChildList = EFalse;
+    if(iChildList == NULL)
+        {
+        InitChildList();//Generates child list  
+        resetChildList = ETrue;
+        }
+    
+    TInt count =    iChildList->Count();
+    CCSXHHtmlTOC2* toc2 = NULL;
+    for(TInt i=0;i<count;++i )
+        {
+        toc2 = STATIC_CAST(CCSXHHtmlTOC2*, (*iChildList)[i]);
+        TBuf<KBufSize> contextFile = contextName;
+        contextFile.Append(KHtmlFileExtn);
+        if(contextFile.Compare(toc2->GetFileName()) == 0)
+            return toc2;//Child list should not be reset
+        }
+    if(resetChildList)
+        ResetChildList();
+    return NULL;    
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// --------------------------------------------------------- 
+CCSXHHelpContentBase* CCSXHHtmlTOC1::GetHtmlTopicForFile(const TDesC&  aFile)
+    {
+    TBool resetChildList = EFalse;
+    if(iChildList ==NULL)
+        {
+        InitChildList();//Generates child list if required.     
+        resetChildList = ETrue;
+        }
+        
+    TInt count = iChildList->Count();
+    CCSXHHtmlTOC2* toc2 = NULL;
+    for(TInt i=0;i<count;++i )
+        {
+        toc2 = STATIC_CAST(CCSXHHtmlTOC2*, (*iChildList)[i]);
+        if(toc2->GetFileName().Compare(aFile) == 0)
+            return toc2;//Child list should not be reset
+        }
+    if(resetChildList)
+        ResetChildList();
+    return NULL;
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+void CCSXHHtmlTOC1::InitChildList()
+    {
+    if(iChildList != NULL)
+        return;
+    ConstructChildList();
+    TRAP_IGNORE(CCSXHHelpDataBase::GetInstance()->GetHtmlParser()->
+                                                        GenerateTOC2ListL(*this,iChildList));
+    }
+TBool CCSXHHtmlTOC1::IsValid() const
+	{
+	return iAppUid.IsValid();
+	}
+	
+	
+TAppUid::TAppUid(const TDesC& aFolder)
+	{
+	TLex lex(aFolder.Mid(KHexPrefixLength));
+	TUint appId = 0;
+	lex.Val(appId,EHex);
+	
+	if(appId)
+		{
+		iUid = TUid::Uid((TInt)appId);
+		iLength = aFolder.Length();		
+		}
+	else
+		{
+		iLength = 0;
+		}
+	}
+
+const TUid& TAppUid::GetUid() const
+	{
+	return iUid;
+	}
+
+TBool TAppUid::IsValid() const
+	{
+	return iLength ? ETrue : EFalse;
+	}
+void TAppUid::AppendUid(TBuf<KMaxFileName>& aStr) const
+	{
+	TInt initialLen = aStr.Length();
+	aStr.Append(KHexPrefix);
+	aStr.AppendNum(iUid.iUid,EHex);
+	TInt finalLen = aStr.Length();
+	
+	while(iLength > (finalLen - initialLen))
+		{
+		aStr.Insert(initialLen+KHexPrefixLength,KZero);
+		++finalLen;
+		}
+	
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHHtmlTOC2.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,181 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHHtmlTOC2 class definition
+*
+*/
+
+#include "CSXHHtmlTOC2.h"
+#include "CSXHHtmlTOC1.h"
+#include "CSXHViewIDs.h"
+#include "CSXHHTMLContentParser.h"
+#include "CSXHHelpDataBase.h"
+#include "csxhconstants.h"
+
+#include <e32base.h>
+#include <zipfile.h>
+#include <bautils.h>
+#include <coehelp.h>
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHHtmlTOC2* CCSXHHtmlTOC2::NewL(CCSXHGenericTOC1* aParent,const TDesC& aName, 
+                                   const TDesC& aHtmlHelpFile, TBool aKeyWordTopic )
+    {
+    CCSXHHtmlTOC2* self = CCSXHHtmlTOC2::NewLC(aParent, aName,aHtmlHelpFile,aKeyWordTopic);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHHtmlTOC2* CCSXHHtmlTOC2::NewLC(CCSXHGenericTOC1* aParent, const TDesC& aName, 
+                                    const TDesC& aHtmlHelpFile, TBool aKeyWordTopic)
+    {
+    CCSXHHtmlTOC2* self = new(ELeave) CCSXHHtmlTOC2(aParent, aName,aHtmlHelpFile,aKeyWordTopic);
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHHtmlTOC2::~CCSXHHtmlTOC2()
+    {//No implementation required
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHHtmlTOC2::CCSXHHtmlTOC2(CCSXHGenericTOC1* aParent,const TDesC& aName, 
+                            const TDesC& aHtmlHelpFile, TBool aKeyWordTopic) :
+                            CCSXHGenericTOC2(aParent, aName),iHTMLFileName(aHtmlHelpFile),
+                            iKeyWordTopic(aKeyWordTopic),iKywdParent(NULL)
+    {//No implementation required
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+TUid CCSXHHtmlTOC2::GetViewID() const
+    {
+    return KCSXHHtmlTopicViewID;
+    }   
+   
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+const TBuf<KMaxFileName>&  CCSXHHtmlTOC2::GetFileName() const
+    {
+    return iHTMLFileName;
+    }
+   
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+EXPORT_C TBool CCSXHHtmlTOC2::GetHelpContext(TCoeHelpContext& aContext) const
+    {
+    
+    CCSXHHtmlTOC1* parent = STATIC_CAST(CCSXHHtmlTOC1*,iParent);
+    aContext.iMajor = parent->GetAppUid();
+    if( KErrNotFound != iHTMLFileName.Find(KHtmlFileExtn) )
+        {
+        aContext.iContext.Append(iHTMLFileName.Left(iHTMLFileName.Find(KHtmlFileExtn)));
+        }
+#ifdef FF_HELP_TUTORIAL_MERGE
+     else if( KErrNotFound != iHTMLFileName.Find(KTutorialFileExtn) )
+        {
+        aContext.iContext.Append(iHTMLFileName.Left(iHTMLFileName.Find(KTutorialFileExtn)));
+        }
+#endif // FF_HELP_TUTORIAL_MERGE
+    return ETrue;
+    }
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+EXPORT_C void CCSXHHtmlTOC2::GetHtmlUrlL(TBuf<KMaxFileName>& aFileUrl) const
+    {
+    aFileUrl = KFileUrlPrefix;
+    
+    aFileUrl.Append(iHTMLFilePath);
+    aFileUrl.Append(iHTMLFileName);
+    
+    TInt pos = aFileUrl.Find(KFwdSlash) ;
+    while (KErrNotFound != pos)
+        {
+        aFileUrl.Replace(pos,1,KBackSlash);
+        pos = aFileUrl.Find(KFwdSlash) ;
+        }
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+EXPORT_C TAny* CCSXHHtmlTOC2::GetTopicContentL()
+    {
+    return CCSXHHelpDataBase::GetInstance()->GetHtmlParser()->GetTopicContentL(this);
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+EXPORT_C HBufC8* CCSXHHtmlTOC2::GetContentsFromUrlL(const TDesC&  fileUrl,CCoeEnv* aCoeEnv, 
+	RFeatureControl& aFeatureControl)
+    {
+    TBuf<KMaxFileName> htmlFile(fileUrl);
+    htmlFile.Delete(0,KFileUrlPrefixLength);//Remove "file:///"
+    //Replace "/" with "\\"
+    TInt pos = htmlFile.Locate('/') ;
+    while (KErrNotFound != pos)
+        {
+        htmlFile.Replace(pos,1,KFwdSlash);
+        pos = htmlFile.Locate('/') ;
+        }
+    return CCSXHHTMLContentParser::GetContentsFromFileL(htmlFile,aCoeEnv,aFeatureControl);
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+EXPORT_C CCSXHKywdTOC1* CCSXHHtmlTOC2::GetKywdParent()
+    {
+    return iKywdParent;
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+void CCSXHHtmlTOC2::SetKywdParent(CCSXHKywdTOC1* aKywdParent)
+    {
+    iKywdParent = aKywdParent;
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+void CCSXHHtmlTOC2::SetHtmlFilePath(const TDesC&  aFilePath)
+	{
+	iHTMLFilePath = aFilePath;
+	}
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    	
+void CCSXHHtmlTOC2::GetHtmlFileName(TBuf<KMaxFileName>&  aFileName)	
+	{
+	aFileName.Copy(KEmptyString);
+	aFileName.Append(iHTMLFilePath);	
+	aFileName.Append(iHTMLFileName);	
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHKywdTOC1.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHKywdTOC1 class definition
+*
+*/
+
+#include "CSXHKywdTOC1.h"
+#include "CSXHViewIDs.h"
+#include "CSXHHelpDataBase.h"
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHKywdTOC1* CCSXHKywdTOC1::NewL(const TDesC& aName)
+    {
+    CCSXHKywdTOC1* self = CCSXHKywdTOC1::NewLC(aName);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHKywdTOC1* CCSXHKywdTOC1::NewLC(const TDesC& aName)
+    {
+    CCSXHKywdTOC1* self = new(ELeave) CCSXHKywdTOC1(aName);
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+CCSXHKywdTOC1::CCSXHKywdTOC1(const TDesC& aName):
+                CCSXHGenericTOC1(aName),iLegacyIndex(-1),iTOC1HtmlList(NULL)
+    {
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+CCSXHKywdTOC1::~CCSXHKywdTOC1()
+    {
+    if(iTOC1HtmlList)
+        {
+        iTOC1HtmlList->Close();
+        delete iTOC1HtmlList;   
+        }
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+TUid CCSXHKywdTOC1::GetViewID() const
+    {
+    return KCSXHKywdToc2ViewID;
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+TInt& CCSXHKywdTOC1::LegacyIndex()
+    {
+    return iLegacyIndex;    
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+void CCSXHKywdTOC1::AppendHtmlTOC1L(CCSXHHtmlTOC1* aToc1)
+    {
+    if(NULL == iTOC1HtmlList)
+        iTOC1HtmlList = new(ELeave) RPointerArray<CCSXHHtmlTOC1>;
+    iTOC1HtmlList->Append(aToc1);
+    }
+    
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+RPointerArray<CCSXHHtmlTOC1>* CCSXHKywdTOC1::GetHtmlTOC1List()
+    {
+    return iTOC1HtmlList;
+    }
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+void CCSXHKywdTOC1::InitChildList()
+    {
+    if(iChildList != NULL)
+        return;
+    ConstructChildList();
+    TRAP_IGNORE(CCSXHHelpDataBase::GetInstance()->GenerateKeywordTOC2ListL(this));
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHKywdTopics.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,179 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHKywdTopics class definition
+*
+*/
+
+#include "CSXHKywdTopics.h"
+#include "CSXHHTMLContentParser.h"
+#include "CSXHHelpDataBase.h"
+#include "CSXHViewIDs.h"
+#include "csxhconstants.h"
+#include "CSXHKywdTOC1.h"
+
+#include <eikenv.h> 
+#include <e32base.h>
+
+//Implementation class. This class will be used when all the keywords has to be displayed   
+class MCSXHKywdTopicsBuilder : public MCSXHKywdBuilder
+    {
+    public:
+    static MCSXHKywdTopicsBuilder* NewL()
+        {
+        MCSXHKywdTopicsBuilder* self = MCSXHKywdTopicsBuilder::NewLC();
+        CleanupStack::Pop(self);
+        return self;
+        }
+    static MCSXHKywdTopicsBuilder* NewLC()
+        {
+        MCSXHKywdTopicsBuilder* self = new(ELeave) MCSXHKywdTopicsBuilder();
+        CleanupStack::PushL(self);
+        return self;
+        }
+    
+    void InsertKeywordL(CCSXHKywdTopics* aKwdTopics, const TDesC& aKwd,CCSXHHtmlTOC1*)
+        {aKwdTopics->InsertKywdL(aKwd);}
+    
+    void InsertKeywordL(CCSXHKywdTopics* aKwdTopics, const TDesC& aKwd,const TInt&)
+        {aKwdTopics->InsertKywdL(aKwd);}
+    
+    private:
+    MCSXHKywdTopicsBuilder(){}
+    };
+
+    
+//Implementation class. This class will be used when user has selected a keyword and
+// wants to navigate to the search result view
+class MCSXHKywdSelectedItemBuilder : public MCSXHKywdBuilder
+    {
+    public:
+    static MCSXHKywdSelectedItemBuilder* NewL(CCSXHKywdTOC1* aCurrentTopic)
+        {
+        MCSXHKywdSelectedItemBuilder* self = MCSXHKywdSelectedItemBuilder::NewLC(aCurrentTopic);
+        CleanupStack::Pop(self);
+        return self;
+        }
+    static MCSXHKywdSelectedItemBuilder* NewLC(CCSXHKywdTOC1* aCurrentTopic)
+        {
+        MCSXHKywdSelectedItemBuilder* self = new(ELeave) 
+        	MCSXHKywdSelectedItemBuilder(aCurrentTopic);
+        CleanupStack::PushL(self);
+        return self;
+        }
+    void InsertKeywordL(CCSXHKywdTopics*, const TDesC& aKwd,CCSXHHtmlTOC1* aToc1) 
+        {
+        if(iCurrentTopic->GetName().Compare(aKwd) == 0)
+            iCurrentTopic->AppendHtmlTOC1L(aToc1);
+        }
+    void InsertKeywordL(CCSXHKywdTopics*, const TDesC& aKwd,const TInt& aLegacyIndex)
+        {
+        if(iCurrentTopic->GetName().Compare(aKwd) == 0)
+            iCurrentTopic->LegacyIndex() = aLegacyIndex;
+        }
+    
+    private:
+    MCSXHKywdSelectedItemBuilder(CCSXHKywdTOC1* aCurrentTopic)
+                                :iCurrentTopic(aCurrentTopic){}
+    CCSXHKywdTOC1* iCurrentTopic;
+    };
+
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------
+CCSXHKywdTopics* CCSXHKywdTopics::NewL(const TApaAppCaption& aAppCaption)
+    {
+    CCSXHKywdTopics* self = CCSXHKywdTopics::NewLC(aAppCaption);
+    CleanupStack::Pop(self);
+    return self;
+    }
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+CCSXHKywdTopics* CCSXHKywdTopics::NewLC(const TApaAppCaption& aAppCaption)
+    {
+    CCSXHKywdTopics* self = new(ELeave) CCSXHKywdTopics(aAppCaption);
+    CleanupStack::PushL(self);
+    return self;
+    }
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+CCSXHKywdTopics::CCSXHKywdTopics(const TDesC& aName) : CCSXHGenericTOC1(aName)
+    {}
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+CCSXHKywdTopics::~CCSXHKywdTopics()
+    {
+    if(iCurrentTopic)
+        delete iCurrentTopic;
+    }
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+TUid CCSXHKywdTopics::GetViewID() const
+    {
+    return KCSXHKywdToc1ViewID;
+    }
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------       
+void CCSXHKywdTopics::CopyChildListL(CDesCArray* aArray)    
+    {
+    iKywdTopics = aArray;
+    MCSXHKywdTopicsBuilder* builder = NULL;
+    builder = MCSXHKywdTopicsBuilder::NewL();
+    CCSXHHelpDataBase::GetInstance()->FillKeywordTopicsL(builder);
+    delete builder;
+    }
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+void CCSXHKywdTopics::InsertKywdL(const TDesC& aKywd)
+    {
+    TBuf<KMaxFileName> child(KTabSpace);
+    child.Append(aKywd);
+    iKywdTopics->InsertIsqL(child);
+    }
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+CCSXHHelpContentBase* CCSXHKywdTopics::GetChildL(const TDesC& aName)
+    {
+    if(iCurrentTopic)
+        {
+        delete iCurrentTopic;
+        iCurrentTopic = NULL;
+        }
+        
+    iCurrentTopic = CCSXHKywdTOC1::NewL(aName);
+    
+    MCSXHKywdSelectedItemBuilder* builder = NULL;
+    builder = MCSXHKywdSelectedItemBuilder::NewL(iCurrentTopic);
+
+    CCSXHHelpDataBase::GetInstance()->FillKeywordTopicsL(builder);
+
+    delete builder;
+    return iCurrentTopic;
+    }
+// ---------------------------------------------------------
+// Items commented in header.
+// ---------------------------------------------------------    
+CCSXHKywdTOC1* CCSXHKywdTopics::GetSelectedTopic()
+    {
+    return iCurrentTopic;
+    }
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHLegacyContentParser.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,280 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHLegacyContentParser class definition
+*
+*/
+
+#include "CSXHLegacyContentParser.h"
+#include "CSXHLegacyTOC1.h"
+#include "CSXHLegacyTOC2.h"
+#include "CSXHKywdTOC1.h"
+#include "CSXHHelpDataBase.h"
+
+#include <coehelp.h>
+#include <coemain.h>
+#include <f32file.h> 
+#include <badesca.h>
+#include <txtrich.h>
+
+CCSXHLegacyContentParser* CCSXHLegacyContentParser::NewL(CCSXHHelpDataBase
+*aDataBase)
+    {
+    CCSXHLegacyContentParser* self = CCSXHLegacyContentParser::NewLC(aDataBase);
+    CleanupStack::Pop(self);
+    return self;
+    }
+    
+CCSXHLegacyContentParser* CCSXHLegacyContentParser::NewLC(CCSXHHelpDataBase
+*aDataBase)
+    {
+    CCSXHLegacyContentParser* self = new (ELeave) CCSXHLegacyContentParser(aDataBase);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+    
+void CCSXHLegacyContentParser::ConstructL()
+    {
+    iModel = CHlpModel::NewL(CCoeEnv::Static()->FsSession(), this);     
+    iModel->OpenL();
+    }
+    
+CCSXHLegacyContentParser::CCSXHLegacyContentParser(CCSXHHelpDataBase* aDataBase)
+                        :iTopic(NULL)
+    {
+    iDataBase = aDataBase;
+    iHlpList = NULL;
+    }
+    
+CCSXHLegacyContentParser::~CCSXHLegacyContentParser()
+    {
+    if(iTopic)
+        delete iTopic;
+    if(iHlpList)
+        delete iHlpList;
+    
+    //No need to delete the entries here, it will be done by the database
+    iLegacyTOC1List.Close();    
+    
+    if(iModel)  
+        {
+        TRAP_IGNORE(iModel->CloseL());
+        delete iModel;  
+        }
+    }
+// --------------------------------------------------------------------------
+// Gets the available kywds from the legacy content and sends them to the
+// database
+// --------------------------------------------------------------------------    
+void CCSXHLegacyContentParser::GenerateKywdTOC1ListL(CCSXHHelpDataBase* aDataBase)
+    {
+    CHlpList* HlpList; 
+    HlpList = CHlpList::NewL();
+    iModel->SearchL(EIndexList);
+    iModel->LoadListL(HlpList); 
+    
+    TInt nCount(HlpList->MdcaCount());
+    for (TInt i(0); i < nCount; i++)
+        {           
+        TBuf<KMaxFileName> appName;
+        appName = HlpList->MdcaPoint(i);
+        TRAP_IGNORE(aDataBase->InsertKeywordL(appName,i,HlpList->Item(i)->HelpFileUid()));
+        }   
+    delete HlpList;
+    }
+// --------------------------------------------------------------------------
+// Gets the available TOC1 from the legacy content and sends them to the
+// database. Local copy of the TOC1 objects is maintained for generating TOC2
+// --------------------------------------------------------------------------    
+void CCSXHLegacyContentParser::GenerateTOC1ListL(CCSXHHelpDataBase* aDataBase)
+    {    
+    const TInt twoColumnFlatArray = 2;
+    CDesCArray* categoryList = new(ELeave) CDesCArrayFlat(twoColumnFlatArray);
+    CleanupStack::PushL(categoryList);
+    iModel->CategoryListL(categoryList);
+    CCSXHLegacyTOC1* categoryObj;
+    TBuf<KMaxFileName> appName;
+    TLinearOrder<CCSXHHelpContentBase> anOrder(Orderer<CCSXHHelpContentBase>);          
+    for (TInt i(0); i < categoryList->Count(); i++)
+        {           
+        appName = categoryList->MdcaPoint(i);                           
+        categoryObj = CCSXHLegacyTOC1::NewLC(appName);
+        if ( aDataBase->GetAppHelpsTopics()->InsertChild(categoryObj) )
+            {
+            iLegacyTOC1List.AppendL(categoryObj);//Keep a local copy*/
+            }
+        CleanupStack::Pop(categoryObj);
+        }
+    CleanupStack::Pop(categoryList);            
+    delete categoryList;
+    }
+// --------------------------------------------------------------------------
+// Gets the available TOC2 objects for the TOC1 object
+// --------------------------------------------------------------------------    
+void CCSXHLegacyContentParser::GenerateTOC2ListL(CCSXHGenericTOC1& aGenericTOC1Object,
+                                 RPointerArray<CCSXHHelpContentBase>* GenericTOC2List)
+    {
+    iModel->SearchL(ETopicListForCategory, aGenericTOC1Object.GetName());
+    if(iHlpList)
+        {
+        delete iHlpList;
+        //Next line is Needed for code scanner
+        iHlpList = NULL;
+        }
+    iHlpList = CHlpList::NewL();
+    iModel->LoadListL(iHlpList);
+    
+    TInt count(iHlpList->MdcaCount());
+    CCSXHGenericTOC2* PLegacyTOC2;
+    TLinearOrder<CCSXHHelpContentBase> anOrder(Orderer<CCSXHHelpContentBase>); 
+    for (TInt i(0); i < count; i++)
+        {    
+        PLegacyTOC2 = CCSXHLegacyTOC2::NewL(&aGenericTOC1Object,iHlpList->MdcaPoint(i));
+        if (KErrNone != GenericTOC2List->InsertInOrder(PLegacyTOC2,anOrder))
+            delete PLegacyTOC2;
+        }        
+    }       
+// --------------------------------------------------------------------------
+// Gets the RTF content for the given topic
+// --------------------------------------------------------------------------    
+TAny* CCSXHLegacyContentParser::GetTopicContentL(CCSXHGenericTOC2* aTopic)
+    {
+    TInt nCount(iHlpList->MdcaCount());
+    TInt nIndex(0);
+    for(nIndex=0;nIndex < nCount; nIndex++)
+        {
+        TBuf<KMaxFileName> appName; 
+        appName.Append(iHlpList->MdcaPoint(nIndex));
+        if(appName.Compare(aTopic->GetName())==0)
+            break;
+        }
+    if( nIndex == nCount )
+        {
+        return NULL;
+        }
+    if(iTopic)
+        {
+        delete iTopic;
+        //Next line is Needed for code scanner
+        iTopic = NULL;
+        }
+    iTopic = CHlpTopic::NewL();
+    CHlpItem* item = iHlpList->Item(nIndex); 
+    iModel->TopicSearchL(*item);    
+    iModel->LoadTopicL(iTopic);    
+    return iTopic->TopicText();    
+    }
+
+void CCSXHLegacyContentParser::HandleModelEventL(TInt aEvent)
+    {
+    iStatus = aEvent;   
+    }
+
+// --------------------------------------------------------------------------
+// Gets the number of kywd subtopics for the given kywd
+// --------------------------------------------------------------------------    
+TInt CCSXHLegacyContentParser::InitGenerateTOC2ListForKeywordSearchL(CCSXHKywdTOC1* aKywdTOC1Object)
+    {
+    if(aKywdTOC1Object->LegacyIndex() == -1 || (!iLegacyTOC1List.Count()))      
+        return 0;
+    CHlpList* SearchList; 
+    
+    if(iHlpList)
+        {
+        delete iHlpList;
+        //Next line is Needed for code scanner
+        iHlpList = NULL;
+        }
+    iHlpList = CHlpList::NewL();
+    SearchList = CHlpList::NewLC();
+    iModel->SearchL(EIndexList);
+    iModel->LoadListL(SearchList);  
+    //Search Panel    
+    CHlpItem* item = SearchList->Item(aKywdTOC1Object->LegacyIndex());
+    iModel->IndexSearchL(*item);    
+    iModel->LoadListL(iHlpList);        
+    
+    CleanupStack::PopAndDestroy(SearchList);
+    return iHlpList->MdcaCount();
+    }
+    
+    
+// --------------------------------------------------------------------------
+// Gets the available kywd subtopics for the given kywd
+// --------------------------------------------------------------------------    
+void CCSXHLegacyContentParser::GenerateTOC2ListForKeywordSearchL(CCSXHKywdTOC1* aKywdTOC1Object)
+    {
+    if(aKywdTOC1Object->LegacyIndex() == -1 || (!iLegacyTOC1List.Count()))      
+        return;
+    
+    TInt nCount(iHlpList->MdcaCount());
+    CCSXHGenericTOC2* PLegacyTOC2;
+    TLinearOrder<CCSXHGenericTOC2> anOrder(Orderer<CCSXHGenericTOC2>); 
+    for (TInt i(0); i < nCount; i++)
+        {   
+        PLegacyTOC2 = CCSXHLegacyTOC2::NewL(aKywdTOC1Object,iHlpList->MdcaPoint(i),ETrue);
+        iDataBase->InsertKeywordTopic(aKywdTOC1Object,PLegacyTOC2);
+        iDataBase->IncrementKeywordSearchCount();
+        }    
+  
+    }
+   
+CCSXHLegacyTOC1* CCSXHLegacyContentParser::GetTOC1ForTOC2(CCSXHLegacyTOC2*)
+    {
+    TInt count = iLegacyTOC1List.Count();
+    CCSXHLegacyTOC1* toc1; 
+    for(TInt i = 0; i<count ; ++i)
+        {
+        toc1 = iLegacyTOC1List[i];
+        if(iTopic->Category().Compare(toc1->GetName())==0)
+            return toc1;
+        }
+    return NULL;    
+    }
+    
+CCSXHHelpContentBase* CCSXHLegacyContentParser::GetContextTopic(TCoeHelpContext& aContext)
+    {
+        TRAPD(err,LoadContextTopicL(aContext));
+        if(err != KErrNone || NULL == iTopic)
+            return NULL;
+        
+        TInt count = iLegacyTOC1List.Count();
+        CCSXHLegacyTOC1* toc1; 
+        for(TInt i = 0; i<count ; ++i)
+            {
+            toc1 = iLegacyTOC1List[i];
+            if(iTopic->Category().Compare(toc1->GetName())==0)
+                {
+                return toc1->GetContextTopic(iTopic->TopicTitle());
+                }
+            }
+        return NULL;
+    }
+
+void CCSXHLegacyContentParser::LoadContextTopicL(TCoeHelpContext& aContext)
+    {
+    if(iTopic)
+        {
+        delete iTopic;
+        //Next line is Needed for code scanner
+        iTopic = NULL;
+        }
+    
+    iModel->ContextSearchL(aContext);
+    if(ETopicAvailable == iStatus )
+        {
+        iTopic = CHlpTopic::NewL();
+        iModel->LoadTopicL(iTopic);     
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHLegacyTOC1.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHLegacyTOC1 class definition
+*
+*/
+
+#include "CSXHLegacyTOC1.h"
+#include "CSXHViewIDs.h"
+#include "CSXHLegacyContentParser.h"
+#include "CSXHHelpDataBase.h"
+
+#include <e32base.h>
+
+CCSXHLegacyTOC1* CCSXHLegacyTOC1::NewL(const TDesC& aName)
+    {
+    CCSXHLegacyTOC1* self = CCSXHLegacyTOC1::NewLC(aName);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCSXHLegacyTOC1* CCSXHLegacyTOC1::NewLC(const TDesC& aName)
+    {
+    CCSXHLegacyTOC1* self = new(ELeave) CCSXHLegacyTOC1(aName);
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+CCSXHLegacyTOC1::CCSXHLegacyTOC1(const TDesC& aName) :
+CCSXHGenericTOC1(aName)
+    {//No implementation required
+    }
+
+TUid CCSXHLegacyTOC1::GetViewID() const
+    {
+    return KCSXHToc2AppHelpsViewID;
+    }
+    
+CCSXHHelpContentBase* CCSXHLegacyTOC1::GetContextTopic(const TDesC& aContextName)
+    {
+    TBool resetChildList = EFalse;
+    if(iChildList ==NULL)
+        {
+        InitChildList();//Generates child list if required.     
+        resetChildList = ETrue;
+        }
+        
+    TInt count =    iChildList->Count();
+    CCSXHHelpContentBase* toc2 = NULL;
+    for(TInt i=0;i<count;++i )
+        {
+        toc2 = (*iChildList)[i];
+        if(toc2->GetName().Compare(aContextName) == 0)
+            return toc2;//Child list should not be reset
+        }
+    if(resetChildList)
+        ResetChildList();
+    return NULL;    
+    }
+
+void CCSXHLegacyTOC1::InitChildList()
+    {
+    ConstructChildList();
+    
+    TRAP_IGNORE(CCSXHHelpDataBase::GetInstance()->
+    GetLegacyParser()->GenerateTOC2ListL(*this,iChildList));
+    }
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHLegacyTOC2.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,65 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHLegacyTOC2 class definition
+*
+*/
+
+#include "CSXHLegacyTOC2.h"
+#include "CSXHViewIDs.h"
+#include "CSXHGenericTOC1.h"
+#include "CSXHLegacyContentParser.h"
+#include "CSXHHelpDataBase.h"
+
+#include <e32base.h>
+
+CCSXHLegacyTOC2* CCSXHLegacyTOC2::NewL(CCSXHGenericTOC1* aParent,const
+TDesC& aName,TBool aKey)
+    {
+    CCSXHLegacyTOC2* self = CCSXHLegacyTOC2::NewLC(aParent,aName,aKey);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCSXHLegacyTOC2* CCSXHLegacyTOC2::NewLC(CCSXHGenericTOC1* aParent,const
+TDesC& aName,TBool aKey)
+    {
+    CCSXHLegacyTOC2* self = new(ELeave) CCSXHLegacyTOC2(aParent,aName,aKey);
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+
+CCSXHLegacyTOC2::CCSXHLegacyTOC2(CCSXHGenericTOC1* aParent,const TDesC& aName,TBool aKey) :
+CCSXHGenericTOC2(aParent,aName),iKeyWordTopic (aKey)
+    {//No implementation required
+    }
+
+TUid CCSXHLegacyTOC2::GetViewID() const
+    {
+    return KCSXHLegacyTopicViewID;
+    }
+    
+EXPORT_C TAny* CCSXHLegacyTOC2::GetTopicContentL()
+    {
+    
+    return CCSXHHelpDataBase::GetInstance()->GetLegacyParser()->GetTopicContentL(this);
+    //return NULL;
+    }
+
+EXPORT_C  CCSXHLegacyTOC1* CCSXHLegacyTOC2::GetLegacyParent()
+    {
+    if(!iKeyWordTopic)
+        return NULL;
+    return CCSXHHelpDataBase::GetInstance()->GetLegacyParser()->GetTOC1ForTOC2(this);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHMainTopics.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHMainTopics class definition
+*
+*/
+
+#include "CSXHMainTopics.h"
+#include "CSXHHTMLContentParser.h"
+#include "CSXHHelpDataBase.h"
+#include "CSXHViewIDs.h"
+#include "csxhconstants.h"
+
+#include <eikenv.h> 
+#include <e32base.h>
+
+CCSXHMainTopics* CCSXHMainTopics::NewL(const TUid& aUid, const TApaAppCaption& aAppCaption, const TInt32 aPriority)
+    {
+    CCSXHMainTopics* self = CCSXHMainTopics::NewLC(aUid,aAppCaption, aPriority);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCSXHMainTopics* CCSXHMainTopics::NewLC(const TUid& aUid,const TApaAppCaption& aAppCaption, const TInt32 aPriority)
+    {
+    CCSXHMainTopics* self = new(ELeave) CCSXHMainTopics(aUid, aAppCaption, aPriority);
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+CCSXHMainTopics::CCSXHMainTopics(const TUid& aUid,const TDesC& aName, const TInt32 aPriority) :
+CCSXHGenericTOC1(aName, aPriority), iUid(aUid)
+    {//No implementation required
+    }
+
+CCSXHMainTopics::~CCSXHMainTopics()
+    {//No implementation required
+    }   
+
+TUid CCSXHMainTopics::GetViewID() const
+    {
+    return iUid;
+    }
+
+void CCSXHMainTopics::ResetChildList()
+    {
+    if(iChildList == NULL)
+        return;
+    TInt count = iChildList->Count();
+    for(TInt i=0;i<count;++i )
+        {
+        STATIC_CAST(CCSXHGenericTOC1*,(*iChildList)[i])->ResetChildList();
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHRuntimeIndexing.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,360 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHRuntimeIndexing class definition
+*
+*/
+
+
+#include <pathinfo.h>
+#include <utf.h>
+#include <bautils.h>
+#include <eikenv.h>
+#include <aknnotedialog.h> // for CAknNoteDialog
+#include <aknnotewrappers.h>
+#include <SenXmlUtils.h>
+#include <SenXmlConstants.h>
+
+#include "CSXHRuntimeIndexing.h"
+#include "CSXHHtmlTOC1.h"
+#include "csxhconstants.h"
+
+// buffer length of Drive information in index file
+//
+const TInt KMaxDriveInfo = 100;
+
+CCSXHRuntimeIndexing::CCSXHRuntimeIndexing()
+    {
+    iCoeEnv = CCoeEnv::Static();
+    }
+    
+CCSXHRuntimeIndexing::~CCSXHRuntimeIndexing()
+    {
+    delete iFullDirName;
+    iFile.Close();
+    }
+    
+CCSXHRuntimeIndexing* CCSXHRuntimeIndexing::NewL()
+    {
+    CCSXHRuntimeIndexing* self = new ( ELeave ) CCSXHRuntimeIndexing();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+    
+void CCSXHRuntimeIndexing::ConstructL()
+    {
+    RFs& fileSession = iCoeEnv->FsSession();
+    iFullDirName = HBufC::NewL( KMaxFileName );
+
+    TFileName fullDirName;
+    
+    GetPrivatePath( fullDirName );
+    if ( !BaflUtils::PathExists( fileSession, fullDirName ) )
+        {
+        fileSession.CreatePrivatePath( EDriveC );
+        }
+    
+    TInt len = fullDirName.Length();
+    TDriveList dirList; 
+    if( fileSession.DriveList( dirList ) == KErrNone )
+        {
+        TDriveInfo info;
+        TInt driveListLen = dirList.Length();
+        
+        for ( TInt i = 0; i < driveListLen; i++ )
+            {
+            // make separate folder for C/D/E/... drive
+            // e.g. C:\\private\\10005234\\C\\
+
+            TInt err = fileSession.Drive( info, i );
+            if ( err == KErrNone &&
+                    info.iType != EMediaNotPresent )
+                {
+                TChar driveChar;
+                RFs::DriveToChar( i, driveChar );
+                fullDirName.Append( driveChar );
+                fullDirName.Append( KFwdSlash );
+                fileSession.MkDir( fullDirName );
+                fullDirName.Delete( len, 3 );
+                }
+            }
+        
+        }
+    }
+    
+TBool CCSXHRuntimeIndexing::IndexFileExistsL()
+    {
+    RFs& fileSession = iCoeEnv->FsSession();
+    TBuf<KMaxFileName> fileName;
+    GetPrivatePath( fileName );
+    fileName.Append( _L("Z\\") );
+    AppendLocaleL( fileName );
+    fileName.Append( KMasterMetaFile );
+    
+    // Now the dirName is C:\\private\\<app-uid>\\Z\\index.xml
+    // check if it exists, if yes, runtime indexing must be launched before
+    // since Z based Help content must be delivered with cell phone
+    //
+    return BaflUtils::FileExists( fileSession, fileName );
+    
+    }
+    
+void CCSXHRuntimeIndexing::BeginIndexFileL( const TChar& aDrive )
+    {
+    RFs& fileSession = iCoeEnv->FsSession();
+    TPtr des = iFullDirName->Des();
+    iDriveLetter = aDrive;
+    des.Zero();
+    GetPrivatePath( des );
+    des.Append( aDrive );
+    des.Append( KFwdSlash );
+    AppendLocaleL( des );
+    if ( !BaflUtils::PathExists( fileSession, des ) )
+        {
+        // generate C:\\private\\<help-uid>\\<aDrive>\\ folder
+        //
+        fileSession.MkDir( des );
+        }
+    
+    // for temporary usage, once it's finished successfully,
+    // rename to index.xml. otherwise, the old index file still exists.
+    //
+    des.Append( KMasterMetaTmpFile );
+    iFile.Replace( fileSession, des, EFileWrite );
+    
+    HBufC8* driveInfo = HBufC8::NewLC( KMaxDriveInfo );
+    TPtr8 ptr = driveInfo->Des();
+    ptr.Append( KIndexXMLVesion );
+    ptr.Append( _L( "<collections drive=\"" ) );
+    ptr.Append( aDrive);
+    ptr.Append( _L( "\">\r\n" ) );
+    iFile.Write( *driveInfo );
+    CleanupStack::PopAndDestroy( driveInfo );
+    }
+    
+void CCSXHRuntimeIndexing::FinishAndCloseIndexFileL()
+    {
+    RFs& fileSession = iCoeEnv->FsSession();
+    iFile.Write( KIndexCollectEnd );
+    iFile.Close();  
+      
+    TTime time;
+    // Replace the index.xml with temporary file, in case it fails, will have no impact
+    // the original index.xml, it's a backup solution
+    //
+    TBuf<KMaxFileName> newName;
+    TInt err = KErrNone;
+    newName.Copy( *iFullDirName );
+    TInt pos = newName.LocateReverse( TChar('\\') );
+    newName.Delete( pos + 1, newName.Length() - pos - 1 ); // remove the temp name
+    newName.Append( KMasterMetaFile ); //  and append index.xml
+    
+    err = fileSession.Replace( *iFullDirName, newName );
+    
+    if ( err == KErrNone )
+        {
+        // set the modified date of master index.xml
+        // to be the same with related help content folder
+        // e.g. C:\\resource\\xhtml\\01\\ modified time is 2009.3.1
+        // C:\\private\\10005234\\C\\01\\index.xml will be 2009.3.1
+        // this will make sure once help content folder changed, index.xml can be
+        // determined to change.
+        TBuf<KMaxFileName> helpDir;
+        helpDir.Append( iDriveLetter );  
+        helpDir.Append( KInstallPath );
+        // append locale information
+        AppendLocaleL( helpDir );
+        
+        fileSession.Modified( helpDir, time );
+        err = fileSession.SetModified( newName, time );
+        
+        }
+    
+    }
+      
+void CCSXHRuntimeIndexing::RuntimeGenerateIndexL( const CCSXHHtmlTOC1& aToc1, const TDesC& aFeature )
+    {
+    // Form into an entry, like
+    // <collection FeatureID="-1" id="0x10005951" navtitle="Bluetooth"></collection>
+    HBufC8* appName = CnvUtfConverter::ConvertFromUnicodeToUtf8L( aToc1.GetName() );
+    CleanupStack::PushL(appName);
+    TRAPD( err, SenXmlUtils::LeaveOnXmlEscapesL( *appName ) );
+    TInt length = KMaxIndexEntryExclude;
+    TBuf8<KMaxUidLength> buffUid;
+    
+    buffUid.Append( KHexPrefix );
+    buffUid.AppendNumFixedWidth( aToc1.GetAppUid().iUid, EHex, 8 );
+    length += appName->Length();
+    length += aFeature.Length();
+    HBufC8* entry = HBufC8::NewLC( length );
+    TPtr8 des = entry->Des();
+    // Append entry tag
+    des.Append( KIndexXMLEntryBegin );
+    // Append feature id attribute "FeatureID"
+    des.Append( KAppFeatureIDTag );
+    des.Append( KIndexQuoteBegin );
+    // Append feature id
+    des.Append( aFeature );
+    des.Append( KIndexQuoteEnd );
+    // Append app id attribute "id"
+    des.Append( KMasterCollection_idTag );
+    des.Append( KIndexQuoteBegin );
+    // Append app id
+    des.Append( buffUid );
+    des.Append( KIndexQuoteEnd );
+    // Append app priority 
+    des.Append( KPriorityTag );
+    des.Append( KIndexQuoteBegin );
+    des.AppendNum(aToc1.Priority());
+    des.Append( KIndexQuoteEnd );
+    // Append app name attribut "navtitle"
+    des.Append( KTOC2NameTag );
+    des.Append( KIndexQuoteBegin );
+    if ( err == KErrSenInvalidCharacters )
+        {
+        // special handling to the XML-Escaped char
+        HBufC8* newElement = SenXmlUtils::EncodeHttpCharactersLC( *appName );
+        des.Append( *newElement );
+        CleanupStack::PopAndDestroy( newElement );
+        }
+    else
+        {
+        des.Append( *appName );
+        }
+
+    des.Append( KIndexXMLEntryEnd );
+    iFile.Write( *entry );
+    
+    CleanupStack::PopAndDestroy( entry );
+    CleanupStack::PopAndDestroy( appName );
+    
+    }
+    
+void CCSXHRuntimeIndexing::GetPrivatePath( TDes& aName )
+    {
+    RFs& fileSession = iCoeEnv->FsSession();
+    TBuf<KMaxFileName> privatePath;
+    TChar drive;
+    RFs::DriveToChar( EDriveC, drive );
+    
+    fileSession.PrivatePath( privatePath );
+    aName.Append( drive );
+    aName.Append( TChar(':') ); 
+    aName.Append( privatePath );
+    }
+
+void CCSXHRuntimeIndexing::AppendLocaleL( TDes& aDir )
+    {
+    RFs& fileSession = iCoeEnv->FsSession();
+    RArray<TLanguage> langs;
+    BaflUtils::GetDowngradePathL( fileSession, User::Language(), langs );
+    TInt len = aDir.Length();
+    
+    if ( len > 0 )
+        {
+        TLanguage lang = langs[0];
+        if(lang < 10)
+            {
+            aDir.AppendNumFixedWidth( lang, EDecimal,2 );
+            }
+        else
+            {
+            aDir.AppendNum( lang );
+            }
+        }
+    else
+        {
+        // rarely case, if no current language, use English
+        aDir.Append( _L("01") );
+        }
+        
+    aDir.Append( KFwdSlash );
+    langs.Reset();
+    }
+    
+void CCSXHRuntimeIndexing::DeleteIndexFileL( const TChar& aDrive )
+    {
+    RFs& fileSession = iCoeEnv->FsSession();
+    TBuf<KMaxFileName> des;
+    GetPrivatePath( des );
+    des.Append( aDrive );
+    des.Append( KFwdSlash );
+    AppendLocaleL( des );
+    // C:\\private\\<app-uid>\\<drive letter>\\<language-id>\\index.xml
+    des.Append( KMasterMetaFile );
+    
+    if ( BaflUtils::FileExists( fileSession, des ) )
+        {
+        fileSession.Delete( des );
+        }
+
+    }
+    
+TInt CCSXHRuntimeIndexing::CheckDirChangeL( const TChar& aDrive )
+    {
+    RFs& fsSession = iCoeEnv->FsSession();
+    
+    // Begin to search help content folder to see if there are date modify
+    // meanwhile, compare to the related folder in private directory
+    TFileName dirName;
+    dirName.Append( aDrive );
+    dirName.Append( KInstallPath );
+
+    // Begin to append locale, note this will append current locale,
+    // thru which, app can determine if it's caused by user changed locales
+    AppendLocaleL( dirName );
+
+    TTime dirModified(0);
+    TTime fileModified(0);
+    
+    if ( BaflUtils::PathExists( fsSession, dirName ) )
+        {
+        // here is modified time of help content folder
+        fsSession.Modified( dirName, dirModified );
+        }
+    else
+        {
+        // fast return, no need to go on checking
+        return KNoDirExist;
+        }
+
+    TFileName filename;
+    GetPrivatePath( filename );
+    filename.Append( aDrive );
+    filename.Append( KFwdSlash );
+    AppendLocaleL( filename );
+    filename.Append( KMasterMetaFile );
+                
+    if ( BaflUtils::FileExists( fsSession, filename ) )
+        {
+        // here is modified time of index.xml
+        //
+        fsSession.Modified( filename, fileModified );
+        }
+    else
+        {
+        return KNoIndexExist;
+        }
+                    
+    if ( fileModified != dirModified )
+        {
+        // folder changed, return it
+        TInt ret = KErrNotFound;
+        RFs::CharToDrive( aDrive, ret );
+        return ret;
+        }
+    
+    return KNoChange;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CSXHXMLParseHandler.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,808 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHXMLParseHandler class definition
+*
+*/
+
+#include "CSXHXMLParseHandler.h"
+#include "CSXHHtmlTOC2.h"
+#include "CSXHKywdTopics.h"
+#include "CSXHHelpDataBase.h"
+#include "CSXHHtmlTOC1.h"
+#include "csxhconstants.h"
+#include "CSXHHTMLContentParser.h"
+
+#include <aknnotewrappers.h> 
+#include <utf.h> 
+#include <eikenv.h> 
+#include <bautils.h>
+
+
+CCSXHXMLParseHandler::CCSXHXMLParseHandler(CCoeEnv*  aCoeEnv)
+    {   
+    iCoeEnv = aCoeEnv;
+    }
+    
+CCSXHXMLParseHandler::~CCSXHXMLParseHandler()
+	{
+	if(iFeatureIds)
+    	{
+    	delete iFeatureIds;
+    	iFeatureIds = NULL;
+    	}
+	}
+TInt CCSXHXMLParseHandler::StartDocument()
+    {
+    return KErrNone;
+    }
+
+TInt CCSXHXMLParseHandler::EndDocument()
+    {    
+    return KErrNone;
+    }
+
+void CCSXHXMLParseHandler::SetDataBasePtr(CCSXHHelpDataBase* aDataBase)
+    {
+    iDataBase = aDataBase;
+    } 
+    
+TDesC& CCSXHXMLParseHandler::GetApplicationName()
+    {
+    return iApplicationName;
+    }
+    
+TPtr CCSXHXMLParseHandler::GetFeatureIds()
+    {    
+    return iFeatureIds->Des();	
+    }
+    
+TBool CCSXHXMLParseHandler::SetAppNameFlag(const TDesC8&  alocalName,const TDesC& aAppTag)
+    {   
+    //R_TYPE_APPLICATION_TAG_NAME
+    TBool Result = EFalse;
+    TBuf<KMaxFileName> AppName;
+    CnvUtfConverter::ConvertToUnicodeFromUtf8(AppName,alocalName);
+    if(AppName.Compare(aAppTag) == 0)
+        {
+        iApplicationName.Copy(KEmptyString);        
+        Result = ETrue;
+        }
+    else
+        {
+        Result = EFalse;
+        }
+    return Result;      
+    } 
+
+//-------------- CCSXHXMLParseHandler_Kywd -------------------
+
+void CCSXHXMLParseHandler_Kywd::SetHtmlContentParserPtr(CCSXHHTMLContentParser* aParser)
+    {
+    iParser = aParser;
+    }
+
+CCSXHXMLParseHandler_Kywd* CCSXHXMLParseHandler_Kywd::NewL(CCoeEnv* aCoeEnv)
+    {
+    CCSXHXMLParseHandler_Kywd* self = new (ELeave)CCSXHXMLParseHandler_Kywd(aCoeEnv);   
+    return self;
+    }
+    
+CCSXHXMLParseHandler_Kywd::CCSXHXMLParseHandler_Kywd(CCoeEnv* aCoeEnv)
+:CCSXHXMLParseHandler(aCoeEnv)                      
+    {       
+        iCurrentHtmlToc1 = NULL;
+        iIsTargetName = EFalse;     
+    }
+    
+TInt  CCSXHXMLParseHandler_Kywd::StartElement (const TDesC8&  /*iURI*/ , const TDesC8&  
+alocalName, const TDesC8&  /*iqualname*/, const RAttributeArray&  aAttributes) 
+    {
+    if(iFeatureIds)
+    	{
+    	delete iFeatureIds;
+    	iFeatureIds = NULL;
+    	}
+    	
+    
+    TRAP_IGNORE(iFeatureIds = HBufC::NewL(2));
+    TPtr FIdValue = iFeatureIds->Des();
+    FIdValue.Copy(_L("-1"));  
+    
+    if(iIsTOC2View)
+        {
+        CreateTOC2ObjectsforKeywordSearch(alocalName,aAttributes);
+        }
+    else
+        {               
+        iIsAppName = SetAppNameFlag(alocalName,KSearchViewTOC1Tag); 
+        
+	    TInt nElements = aAttributes.Count();
+	    TBuf<KMaxFileName> TagName; 
+	    RAttribute AttributeInfo;
+	    RTagInfo TagInformation;	    
+    	CnvUtfConverter::ConvertToUnicodeFromUtf8(TagName,alocalName);
+    
+	    for(TInt i=0; i<nElements; i++)
+	        {
+	        AttributeInfo = aAttributes.operator[](i);             
+	        TagInformation = AttributeInfo.Attribute();
+	        
+	        TBuf<KMaxUnits> LocalName;
+	        //Read from resource file
+	        CnvUtfConverter::ConvertToUnicodeFromUtf8(LocalName,TagInformation.LocalName().DesC());	        
+	        if(LocalName.Compare(_L("FeatureID")) == 0 && TagName.Compare(_L("text")) == 0) 
+	        	{
+	        	if(iFeatureIds)
+			    	{
+			    	delete iFeatureIds;
+			    	iFeatureIds = NULL;
+			    	}
+	        	
+	        	TRAP_IGNORE(iFeatureIds = HBufC::NewL(AttributeInfo.Value().DesC().Length()));
+	        	TPtr FIdValue = iFeatureIds->Des(); 
+	        	CnvUtfConverter::ConvertToUnicodeFromUtf8(FIdValue,AttributeInfo.Value().DesC());
+	        	}	        	
+	        }       
+        }   
+    return KErrNone;
+    }
+
+TInt CCSXHXMLParseHandler_Kywd::EndElement  (  const TDesC8&  ,const TDesC8& ,const TDesC8& ) 
+    {
+	TRAP_IGNORE(CreateAndInsertKywdL());//Result can be ignored        
+    iIsTargetName = EFalse;
+    iIsAppName = EFalse;    
+    return KErrNone;
+    }
+    
+TInt CCSXHXMLParseHandler_Kywd::Characters (const TDesC8&  aBuff, const TInt /*aStart*/, const TInt /*aLength*/) 
+    {
+    TBuf<KMaxFileName> TitleName;   
+    if(iIsAppName)
+        {           
+        CnvUtfConverter::ConvertToUnicodeFromUtf8(TitleName,aBuff);
+        iApplicationName.Append(TitleName);     
+        }
+    else if(iIsTargetName)
+        {
+        CnvUtfConverter::ConvertToUnicodeFromUtf8(TitleName,aBuff);
+        iKeywordSearchTOC2TitleName.Append(TitleName);              
+        }
+    return KErrNone;
+    }
+
+void CCSXHXMLParseHandler_Kywd::CreateTOC2ObjectsforKeywordSearch(const TDesC8& 
+ alocalName, const RAttributeArray&  aAttributes)
+    {
+        iIsAppName = SetAppNameFlag(alocalName,KSearchViewTOC1Tag);
+        
+        TInt nElements = aAttributes.Count();
+        TBuf<KMaxFileName>TagValue; 
+        RAttribute AttributeInfo;
+        RTagInfo TagInformation;
+		
+		TBuf<KMaxFileName> AppName;
+        CnvUtfConverter::ConvertToUnicodeFromUtf8(AppName,alocalName);
+        if(AppName.Compare(KSearchViewTOC2Tag) == 0)
+            {
+            iKeywordSearchTOC2TitleName.Copy(KEmptyString);
+            iIsTargetName = ETrue;
+            }
+        else
+            {
+            iIsTargetName = EFalse;
+            }
+		
+		if(!iIsTOC2View)            		               
+			return;
+		
+        for(TInt i=0; i<nElements; i++)
+            {
+            AttributeInfo = aAttributes.operator[](i);             
+            TagInformation = AttributeInfo.Attribute();
+            
+            TBuf<KMaxUnits> LocalName;
+            //Read from resource file
+            CnvUtfConverter::ConvertToUnicodeFromUtf8(LocalName,TagInformation.LocalName().DesC());
+            if(LocalName.Compare(KHtmlPageTag) == 0)    
+                {               
+                CnvUtfConverter::ConvertToUnicodeFromUtf8(iHTMLPageName,
+                	AttributeInfo.Value().DesC());
+                }
+            else if(LocalName.Compare(_L("FeatureID")) == 0) 
+	            {
+   	        	if(iFeatureIds)
+			    	{
+			    	delete iFeatureIds;
+			    	iFeatureIds = NULL;
+			    	}
+	        	TRAP_IGNORE(iFeatureIds = HBufC::NewL(AttributeInfo.Value().DesC().Length()));
+	        	TPtr FIdValue = iFeatureIds->Des(); 
+	        	CnvUtfConverter::ConvertToUnicodeFromUtf8(FIdValue,AttributeInfo.Value().DesC());
+
+	            }
+            }
+        
+    }   
+    
+void CCSXHXMLParseHandler_Kywd::CreateAndInsertKywdL()
+    {    
+    if(iParser->CheckFeatureIDL(iFeatureIds->Des()))
+        {
+        if(iIsAppName && !iIsTOC2View)
+	        {
+	        iDataBase->InsertKeywordL(iApplicationName,iCurrentHtmlToc1);	
+	        }
+        else if(iIsTargetName && iApplicationName.Compare(iTOC1Name)==0)
+	        {
+	        CCSXHHtmlTOC2* PXHTMLObject = 
+	        CCSXHHtmlTOC2::NewL(iCurrentHtmlToc1,iKeywordSearchTOC2TitleName,iHTMLPageName,ETrue);
+	        PXHTMLObject->SetKywdParent(STATIC_CAST(CCSXHKywdTopics*,iDataBase->GetKywdTopics())
+	                                            ->GetSelectedTopic());
+			STATIC_CAST(CCSXHHtmlTOC2*,PXHTMLObject)->SetHtmlFilePath(iFilePath);                                            
+	        iDataBase->InsertKeywordTopicL(/*iTOC1Name,*/PXHTMLObject);	
+	        }
+        }
+    }
+    
+void CCSXHXMLParseHandler_Kywd::SetTOC1Title(const TDesC& aName)
+    {
+    iTOC1Name = aName;  
+    }   
+
+void CCSXHXMLParseHandler_Kywd::SetCurrentHtmlToc1(CCSXHHtmlTOC1* aCurrentHtmlToc1)
+    {
+    iCurrentHtmlToc1 = aCurrentHtmlToc1;
+    }
+    
+void  CCSXHXMLParseHandler_Kywd::SetIsTOC2(TBool aFlag)
+    {
+    iIsTOC2View = aFlag;
+    }       
+    
+void CCSXHXMLParseHandler_Kywd::SetPath(const TDesC&  aFilePath)
+	{
+	iFilePath.Copy(KEmptyString);
+	iFilePath.Append(aFilePath);
+	}    
+
+//-------------- CCSXHXMLParseHandler_MetaFile -------------------
+
+CCSXHXMLParseHandler_MetaFile* CCSXHXMLParseHandler_MetaFile::NewL(CCoeEnv* aCoeEnv)
+    {
+    CCSXHXMLParseHandler_MetaFile* self = new (ELeave)CCSXHXMLParseHandler_MetaFile(aCoeEnv);   
+    return self;
+    }
+    
+CCSXHXMLParseHandler_MetaFile::CCSXHXMLParseHandler_MetaFile(CCoeEnv* aCoeEnv)
+:CCSXHXMLParseHandler(aCoeEnv)
+    {
+    
+    }
+TInt  CCSXHXMLParseHandler_MetaFile::StartElement (const TDesC8&  , const TDesC8&  
+alocalName, const TDesC8&  , const RAttributeArray& aAttributes) 
+    {
+    iIsAppName = SetAppNameFlag(alocalName,KAppNameTag);
+
+    TInt nElements = aAttributes.Count();    
+    TBuf<KMaxFileName> LocalTagName; 
+    RAttribute AttributeInfo;
+    RTagInfo TagInformation;
+    
+    CnvUtfConverter::ConvertToUnicodeFromUtf8(LocalTagName,alocalName);
+    for(TInt i=0; i<nElements; i++)
+        {
+        AttributeInfo = aAttributes.operator[](i);             
+        TagInformation = AttributeInfo.Attribute();
+        
+    	if(iFeatureIds)
+	    	{
+	    	delete iFeatureIds;
+	    	iFeatureIds = NULL;
+	    	}
+    	
+    	TRAP_IGNORE(iFeatureIds = HBufC::NewL(AttributeInfo.Value().DesC().Length()));
+    	TPtr FIdValue = iFeatureIds->Des(); 
+    	CnvUtfConverter::ConvertToUnicodeFromUtf8(FIdValue,AttributeInfo.Value().DesC());    	
+        }
+        
+    if(LocalTagName.Compare(KAppNameTag) == 0 && nElements == 0)        
+		{
+		if(iFeatureIds)
+	    	{
+	    	delete iFeatureIds;
+	    	iFeatureIds = NULL;
+	    	}
+		
+		TRAP_IGNORE(iFeatureIds = HBufC::NewL(2));
+	    TPtr FIdValue = iFeatureIds->Des();
+	    FIdValue.Copy(_L("-1"));  
+		}
+    
+    if ( LocalTagName.Compare(KPriorityTag) == 0 && nElements == 0 )
+    	{
+    	iIsPriority = ETrue;
+    	iPriority.Copy(KEmptyString); 
+    	}
+    else
+    	{
+    	iIsPriority = EFalse;
+    	}
+        
+    return KErrNone;
+    }
+
+TInt CCSXHXMLParseHandler_MetaFile::EndElement  (  const TDesC8&  ,const TDesC8& ,const TDesC8& ) 
+    {
+    iIsAppName = EFalse;
+    iIsPriority = EFalse;
+    return KErrNone;
+    }
+    
+TInt CCSXHXMLParseHandler_MetaFile::Characters (const TDesC8&  aBuff, const TInt /*aStart*/, const TInt /*aLength*/) 
+    {
+    if (iIsAppName)
+        {  
+        TBuf<KMaxFileName> TitleName; 
+        CnvUtfConverter::ConvertToUnicodeFromUtf8(TitleName,aBuff);
+        iApplicationName.Append(TitleName);     
+        }
+		
+    if (iIsPriority)
+        {    
+        TBuf<8> Priority; 
+        CnvUtfConverter::ConvertToUnicodeFromUtf8(Priority,aBuff);
+        iPriority.Append(Priority); 
+        }
+
+    return KErrNone;
+    }
+
+TInt32 CCSXHXMLParseHandler_MetaFile::Priority()
+    {
+	//The default priority is set to 0
+	TInt priority = 0;
+	
+	if (iPriority.Length() != 0)
+		{
+	    TLex lex( iPriority );
+	    lex.Val( priority );
+	    iPriority.Copy(KEmptyString); 
+		}
+	      
+    return priority;
+    }
+    
+
+//-------------- CCSXHXMLParseHandler_MasterMetaFile -------------------
+CCSXHXMLParseHandler_MasterMetaFile* CCSXHXMLParseHandler_MasterMetaFile::NewL(CCoeEnv* aCoeEnv)
+    {
+    CCSXHXMLParseHandler_MasterMetaFile* self = new (ELeave)CCSXHXMLParseHandler_MasterMetaFile(aCoeEnv); 
+    return self;
+    }
+    
+CCSXHXMLParseHandler_MasterMetaFile::CCSXHXMLParseHandler_MasterMetaFile(CCoeEnv* aCoeEnv)
+:CCSXHXMLParseHandler(aCoeEnv)
+    {
+        
+    }
+    
+TInt  CCSXHXMLParseHandler_MasterMetaFile::StartElement (const TDesC8&  , const TDesC8&  
+, const TDesC8&  , const RAttributeArray&  aAttributes) 
+    {
+    TRAP_IGNORE(CreateTOC1ObjectsL(aAttributes));
+    return KErrNone;
+    }
+    
+
+        
+void CCSXHXMLParseHandler_MasterMetaFile::CreateTOC1ObjectsL(const
+ RAttributeArray&  aAttributes)
+    {
+    TInt nElements = aAttributes.Count();
+    TBuf<KMaxFileName> appUid; 
+    TBuf<KMaxFileName> appName; 
+    TBuf<8> priorityBuf;
+    TInt32 appPriority;
+    RAttribute AttributeInfo;
+    RTagInfo TagInformation;
+    TLinearOrder<CCSXHHelpContentBase> anOrder(Orderer<CCSXHHelpContentBase>);      
+	
+    for(TInt i=0; i<nElements; i++)
+        {
+        AttributeInfo = aAttributes.operator[](i);             
+        TagInformation = AttributeInfo.Attribute();
+        
+        TBuf<KMaxUnits> LocalName;
+        //Read from resource file
+        CnvUtfConverter::ConvertToUnicodeFromUtf8(LocalName,TagInformation.LocalName().DesC());
+        
+        if ( LocalName.Compare( KDriveInfo ) == 0 )
+            {
+            TChar driveLetter(AttributeInfo.Value().DesC()[0]);
+            RFs::CharToDrive( driveLetter, iDrive );
+            }
+            
+        if(LocalName.Compare(KMasterCollection_idTag) == 0)
+            {
+            CnvUtfConverter::ConvertToUnicodeFromUtf8(appUid,AttributeInfo.Value().DesC());                    
+            }
+        
+        if (LocalName.Compare(KPriorityTag) == 0)
+            {
+            CnvUtfConverter::ConvertToUnicodeFromUtf8(priorityBuf,AttributeInfo.Value().DesC());
+            TLex lex( priorityBuf );
+            lex.Val( appPriority );
+            }
+                    
+        if(LocalName.Compare(KTOC2NameTag) == 0)
+            {
+            CnvUtfConverter::ConvertToUnicodeFromUtf8(appName,AttributeInfo.Value().DesC());
+            if(2 == nElements)
+            	{
+            	if(iFeatureIds)
+			    	{
+			    	delete iFeatureIds;
+			    	iFeatureIds = NULL;
+			    	}
+            	
+            	iFeatureIds = HBufC::NewL(2);
+			    TPtr FIdValue = iFeatureIds->Des();
+			    FIdValue.Copy(_L("-1"));  
+            	}
+            	
+            
+            iParser->InsertHTMLToc1L( appUid, appName, iDrive, iDataBase, iFeatureIds->Des(), appPriority );                            	
+            }
+            
+        if(LocalName.Compare(_L("FeatureID")) == 0) 
+            {
+        	if(iFeatureIds)
+		    	{
+		    	delete iFeatureIds;
+		    	iFeatureIds = NULL;
+		    	}
+        	
+        	iFeatureIds = HBufC::NewL(AttributeInfo.Value().DesC().Length());
+        	TPtr FIdValue = iFeatureIds->Des(); 
+        	CnvUtfConverter::ConvertToUnicodeFromUtf8(FIdValue,AttributeInfo.Value().DesC());
+            }            
+        }        
+    } 
+    
+void CCSXHXMLParseHandler_MasterMetaFile::SetHtmlContentParserPtr(CCSXHHTMLContentParser* aParser)
+    {
+    iParser = aParser;
+    }
+
+    
+//-------------- CCSXHXMLParseHandler_IndexFile -------------------
+
+CCSXHXMLParseHandler_IndexFile* CCSXHXMLParseHandler_IndexFile::NewL(CCoeEnv* aCoeEnv)
+    {
+    CCSXHXMLParseHandler_IndexFile* self = new (ELeave)CCSXHXMLParseHandler_IndexFile(aCoeEnv); 
+    return self;
+    }
+    
+CCSXHXMLParseHandler_IndexFile::CCSXHXMLParseHandler_IndexFile(CCoeEnv* aCoeEnv)
+:CCSXHXMLParseHandler(aCoeEnv)
+    {
+        
+    }
+    
+TInt  CCSXHXMLParseHandler_IndexFile::StartElement (const TDesC8&  , const TDesC8&  
+, const TDesC8&  , const RAttributeArray&  aAttributes) 
+    {
+    if(iFeatureIds)
+    	{
+    	delete iFeatureIds;
+    	iFeatureIds = NULL;
+    	}
+            	
+    TRAP_IGNORE(iFeatureIds = HBufC::NewL(2));
+    TPtr FIdValue = iFeatureIds->Des();
+    FIdValue.Copy(_L("-1"));  
+
+    TRAP_IGNORE(CreateTOC2ObjectsL(aAttributes));
+    return KErrNone;
+    }
+    
+void CCSXHXMLParseHandler_IndexFile::SetArray(RPointerArray<CCSXHHelpContentBase>* aHTMLlist)
+    {
+    iTOC2Array = aHTMLlist;
+    }
+    
+void CCSXHXMLParseHandler_IndexFile::SetGenericTOC1Object(CCSXHGenericTOC1& aParent)
+    {
+    iParent = &aParent;
+    }
+    
+void CCSXHXMLParseHandler_IndexFile::SetHtmlContentParserPtr(CCSXHHTMLContentParser* aParser)
+    {
+    iParser = aParser;
+    }
+    
+        
+void CCSXHXMLParseHandler_IndexFile::CreateTOC2ObjectsL(const
+ RAttributeArray&  aAttributes)
+    {
+    TInt nElements = aAttributes.Count();
+    TBuf<KMaxFileName>TagValue; 
+    RAttribute AttributeInfo;
+    RTagInfo TagInformation;
+    TLinearOrder<CCSXHHelpContentBase> anOrder(Orderer<CCSXHHelpContentBase>);      
+
+    for(TInt i=0; i<nElements; i++)
+        {
+        AttributeInfo = aAttributes.operator[](i);             
+        TagInformation = AttributeInfo.Attribute();
+        
+        TBuf<KMaxUnits> LocalName;
+        //Read from resource file
+        CnvUtfConverter::ConvertToUnicodeFromUtf8(LocalName,TagInformation.LocalName().DesC());
+                    
+        if(LocalName.Compare(KTOC2NameTag) == 0)
+            {
+            if(iParser->CheckFeatureIDL(iFeatureIds->Des()) || 2 == nElements)
+	            {            	
+	            CnvUtfConverter::ConvertToUnicodeFromUtf8(TagValue,AttributeInfo.Value().DesC());
+	            
+	            CCSXHGenericTOC2* PXHTMLObject = CCSXHHtmlTOC2::NewL(iParent,
+	            								 TagValue,iHTMLPageName);
+
+				STATIC_CAST(CCSXHHtmlTOC2*,PXHTMLObject)->SetHtmlFilePath(iFilePath);
+				
+	            if (KErrNone != iTOC2Array->InsertInOrder(PXHTMLObject,anOrder))
+	                delete PXHTMLObject;
+	            }            
+            }
+        else if(LocalName.Compare(KHtmlPageTag) == 0)   
+            {               
+            CnvUtfConverter::ConvertToUnicodeFromUtf8(iHTMLPageName,
+            AttributeInfo.Value().DesC());
+            }
+        else if(LocalName.Compare(KCompressedTag) == 0)
+            {
+            CnvUtfConverter::ConvertToUnicodeFromUtf8(iCompressString,
+			AttributeInfo.Value().DesC());
+            }
+        else if(LocalName.Compare(_L("FeatureID")) == 0)
+        	{
+        	if(iFeatureIds)
+		    	{
+		    	delete iFeatureIds;
+		    	iFeatureIds = NULL;
+		    	}
+        	
+        	iFeatureIds = HBufC::NewL(AttributeInfo.Value().DesC().Length());
+        	TPtr FIdValue = iFeatureIds->Des(); 
+        	CnvUtfConverter::ConvertToUnicodeFromUtf8(FIdValue,AttributeInfo.Value().DesC());
+            }        
+        }        
+    } 
+    
+void CCSXHXMLParseHandler_IndexFile::SetPath(const TDesC&  aFilePath)
+	{
+	iFilePath.Copy(KEmptyString);
+	iFilePath.Append(aFilePath);
+	}
+    
+//-------------- CCSXHXMLParseHandler_MasterKeywordFile -------------------
+
+CCSXHXMLParseHandler_MasterKywd* CCSXHXMLParseHandler_MasterKywd::NewL(CCoeEnv* aCoeEnv)
+    {
+    CCSXHXMLParseHandler_MasterKywd* self = new (ELeave)CCSXHXMLParseHandler_MasterKywd(aCoeEnv); 
+    return self;
+    }
+    
+CCSXHXMLParseHandler_MasterKywd::CCSXHXMLParseHandler_MasterKywd(CCoeEnv* aCoeEnv)
+:CCSXHXMLParseHandler(aCoeEnv)
+    {
+        
+    }    
+
+TInt  CCSXHXMLParseHandler_MasterKywd::StartElement (const TDesC8&  , const TDesC8&  
+, const TDesC8&  , const RAttributeArray&  aAttributes) 
+    {
+    TRAP_IGNORE(CreateTOC1ObjectsL(aAttributes));
+    return KErrNone;
+    }
+    
+void CCSXHXMLParseHandler_MasterKywd::SetHtmlContentParserPtr(CCSXHHTMLContentParser* aParser)
+    {
+    iParser = aParser;
+    }
+
+void CCSXHXMLParseHandler_MasterKywd::SetCurrentHtmlToc1(CCSXHHtmlTOC1* aCurrentHtmlToc1)
+    {
+    iCurrentHtmlToc1 = aCurrentHtmlToc1;
+    }
+         
+void CCSXHXMLParseHandler_MasterKywd::CreateTOC1ObjectsL(const
+ RAttributeArray&  aAttributes)
+    {
+    TInt nElements = aAttributes.Count();
+    TBuf<KMaxFileName> appUid; 
+    TBuf<KMaxFileName> KeywordName; 
+    RAttribute AttributeInfo;
+    RTagInfo TagInformation;
+	    
+    TLinearOrder<CCSXHHelpContentBase> anOrder(Orderer<CCSXHHelpContentBase>);      
+
+    for(TInt i=0; i<nElements; i++)
+        {
+        AttributeInfo = aAttributes.operator[](i);             
+        TagInformation = AttributeInfo.Attribute();
+        
+        TBuf<KMaxUnits> LocalName;
+        //Read from resource file
+        CnvUtfConverter::ConvertToUnicodeFromUtf8(LocalName,TagInformation.LocalName().DesC());
+                    
+        if(LocalName.Compare(KMasterSearchTag) == 0)
+            {
+            CnvUtfConverter::ConvertToUnicodeFromUtf8(KeywordName,AttributeInfo.Value().DesC());
+            }
+                    
+        if(LocalName.Compare(KMasterCollectionTag) == 0)
+            {
+            CnvUtfConverter::ConvertToUnicodeFromUtf8(appUid,AttributeInfo.Value().DesC());
+            if(2 == nElements)
+            	{
+				if(iParser->GetHTMLToc1(appUid,this))      
+	            	iDataBase->InsertKeywordL(KeywordName,iCurrentHtmlToc1);           	            	
+            	}
+            }       
+            
+		if(LocalName.Compare(_L("FeatureID")) == 0)    
+			{
+        	if(iFeatureIds)
+		    	{
+		    	delete iFeatureIds;
+		    	iFeatureIds = NULL;
+		    	}
+        	
+        	iFeatureIds = HBufC::NewL(AttributeInfo.Value().DesC().Length());
+        	TPtr FIdValue = iFeatureIds->Des(); 
+        	CnvUtfConverter::ConvertToUnicodeFromUtf8(FIdValue,AttributeInfo.Value().DesC());
+
+			if(iParser->CheckFeatureIDL(iFeatureIds->Des()))
+				{
+				if(iParser->GetHTMLToc1(appUid,this))      
+	            	iDataBase->InsertKeywordL(KeywordName,iCurrentHtmlToc1);           	
+				}
+			}
+        }        
+    }
+
+//-------------- CCSXHXMLParseHandler_RedirectFile -------------------
+
+CCSXHXMLParseHandler_RedirectFile* CCSXHXMLParseHandler_RedirectFile::NewL( CCoeEnv *aCoeEnv, 
+		const TUid &aSourceUid, const TCoeContextName &aSourceContextName )
+    {
+    CCSXHXMLParseHandler_RedirectFile* self = 
+    		new (ELeave)CCSXHXMLParseHandler_RedirectFile( aCoeEnv, aSourceUid, aSourceContextName );   
+    return self;
+    }
+    
+CCSXHXMLParseHandler_RedirectFile::CCSXHXMLParseHandler_RedirectFile( CCoeEnv *aCoeEnv, 
+		const TUid &aSourceUid, const TCoeContextName &aSourceContextName )
+:CCSXHXMLParseHandler( aCoeEnv ), iSourceContextName( aSourceContextName ), iTargetUid( aSourceUid )
+    {
+    }
+TInt  CCSXHXMLParseHandler_RedirectFile::StartElement (const TDesC8&  , 
+		const TDesC8 &alocalName, const TDesC8&  , const RAttributeArray &aAttributes) 
+    {
+    if ( !iIsTargetPathFound )
+    	{
+        TBuf<KMaxFileName> LocalTagName; 
+  
+        CnvUtfConverter::ConvertToUnicodeFromUtf8(LocalTagName,alocalName);
+        
+        if ( LocalTagName.Compare(KFromTag) == 0 )        
+		    {
+		    iIsFromTag = ETrue;
+		    iIsToTag = EFalse;
+		    }
+        else if (LocalTagName.Compare(KToTag) == 0 )        
+            {
+    	    iIsToTag = ETrue;
+    	    iIsFromTag = EFalse;
+    	    }
+        else
+            {
+            iIsFromTag = EFalse;
+            iIsToTag = EFalse;
+            }
+        iFromContent.Copy(KEmptyString);
+    	}
+        
+    return KErrNone;
+    }
+
+TInt CCSXHXMLParseHandler_RedirectFile::EndElement  ( const TDesC8&  ,const TDesC8& ,const TDesC8& ) 
+    { 
+    if ( iIsFromTag && iFromContent.Compare( iSourceContextName ) == 0 )
+    	{
+        iIsSourceContextNameFound = ETrue;
+    	}
+    else
+    	{
+        iIsSourceContextNameFound = EFalse;
+    	}
+    
+    iIsFromTag = EFalse;
+    iIsToTag = EFalse;
+    
+    return KErrNone;
+    }
+    
+TInt CCSXHXMLParseHandler_RedirectFile::Characters (const TDesC8&  aBuff, const TInt /*aStart*/, const TInt /*aLength*/) 
+    {
+    if ( iIsFromTag )
+        {  
+        TCoeContextName file; 
+        CnvUtfConverter::ConvertToUnicodeFromUtf8(file,aBuff);
+        iFromContent.Append(file);     
+        }
+    
+    else if ( iIsSourceContextNameFound && iIsToTag )
+    	{
+    	TBuf<KMaxFileName> targetPath; 
+    	CnvUtfConverter::ConvertToUnicodeFromUtf8(targetPath,aBuff);
+    	iTargetPath.Append(targetPath); 
+	
+    	iIsTargetPathFound = ETrue;	
+    	}
+   
+    return KErrNone;
+    }
+
+TUid CCSXHXMLParseHandler_RedirectFile::TargetUid()
+	{
+	TInt loc = iTargetPath.Find( KHexPrefix );
+	if ( loc != KErrNotFound )
+	    {
+	    TLex lex( iTargetPath.Mid( loc+KHexPrefixLength, KHexUidLength ) );
+	    TUint appId = 0;
+	    lex.Val( appId, EHex );
+	    		
+	    if ( appId )
+	        {
+	    	iTargetUid = TUid::Uid( (TInt)appId );		
+	        }
+	    }
+	    	
+	return iTargetUid;
+	}
+
+TBuf<KMaxFileName>& CCSXHXMLParseHandler_RedirectFile::TargetContextName()
+	{
+	TInt loc = iTargetPath.Find( KHexPrefix );
+    if ( loc != KErrNotFound )
+        {    	    
+		iTargetContextName = iTargetPath.Mid( loc + KOffsetFromUidToContext );
+		}
+    else
+        {
+		iTargetContextName = iTargetPath;
+		}
+		    	
+	return iTargetContextName;
+	}
+
+TBool CCSXHXMLParseHandler_RedirectFile::IsTargetPathFound()
+	{
+	return iIsTargetPathFound;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/CsHelpCmdLineParser.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,98 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     This is a utility class that provides functionality
+*     for parsing command line arguments passed into the
+*     Cshelp application when launched by another application.
+*
+*
+*/
+
+
+// INCLUDE FILES
+#include <hlplch.h>
+
+#include "CsHelpCmdLineParser.h"
+const TInt KArrSize = 2;
+// ================= MEMBER FUNCTIONS =======================
+
+// C++ constructor
+CCsHlpCmdLineParser::CCsHlpCmdLineParser()
+: CBase()
+    {
+    }
+
+
+// ---------------------------------------------------------
+// CCsHlpCmdLineParser::ConstructL(...)
+// (other items were commented in a header).
+// ---------------------------------------------------------
+void CCsHlpCmdLineParser::ConstructL(const TDesC8& aCmdLine)
+    {
+    iCmdLine = CBufFlat::NewL(aCmdLine.Size());
+    iCmdLine->InsertL(0, aCmdLine.Ptr(), aCmdLine.Size());
+    }
+
+
+// ---------------------------------------------------------
+// CCsHlpCmdLineParser::~CCsHlpCmdLineParser()
+// ---------------------------------------------------------
+CCsHlpCmdLineParser::~CCsHlpCmdLineParser()
+    {
+    delete iCmdLine;
+    }
+
+// ---------------------------------------------------------
+// CCsHlpCmdLineParser::ContextListL()
+// (other items were commented in a header).
+// ---------------------------------------------------------
+CArrayFix<TCoeHelpContext>* CCsHlpCmdLineParser::ContextListL()
+    {
+    CArrayFixFlat<TCoeHelpContext>* array =
+                                  new(ELeave)CArrayFixFlat<TCoeHelpContext>(KArrSize);
+    CleanupStack::PushL(array);
+    TInt count(0);
+
+    iCmdLine->Read(0, &count, sizeof(TInt));
+    iPos += sizeof(TInt);
+    for (TInt i(0); i < count; i++)
+        {
+        TCoeHelpContext context;
+        GetContext(context);
+        array->AppendL(context);
+        }
+    CleanupStack::Pop(array); // array
+    return array;
+    }
+
+// ---------------------------------------------------------
+// CCsHlpCmdLineParser::GetContext(...)
+// (other items were commented in a header).
+// ---------------------------------------------------------
+void CCsHlpCmdLineParser::GetContext(TCoeHelpContext& aContext)
+    {
+    TInt length(0);
+    iCmdLine->Read(iPos, &length, sizeof(TInt));
+    iPos += sizeof(TInt);
+    TPtr8 ptr((TText8*)aContext.iContext.Ptr(), length);
+    iCmdLine->Read(iPos, ptr, length);
+    aContext.iContext.SetLength(length/KArrSize);
+    iPos += length;
+
+    iCmdLine->Read(iPos, &aContext.iMajor, sizeof(TUid));
+
+    iPos += sizeof(TUid);
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/HelpEngine/src/HelpEngine.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -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 "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+#include <bautils.h>
+//#include <data_caging_path_literals.hrh>
+
+#ifdef EKA2 
+GLDEF_C TInt E32Dll() 
+#else 
+GLDEF_C TInt E32Dll(TDllReason /*aReason*/) 
+#endif 
+    {
+    return(KErrNone);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/aif/CsHelp_Caption.rss	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     This file contains caption resource of CsHelp.
+*
+*
+*/
+
+
+#include <apcaptionfile.rh>
+
+#include "csxelp.loc"
+
+RESOURCE CAPTION_DATA
+    {
+    caption = qtn_apps_ls1_help;
+    shortcaption = qtn_apps_grid_help;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/aif/CsHelpaif.rss	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     RSS for creating the aif file for CsHelp.
+*
+*/
+
+
+NAME HAIF
+#include <aiftool.rh>
+
+#include "csxhelp.loc"
+
+RESOURCE AIF_DATA
+    {
+    app_uid=0x10005234;
+    num_icons = 2;
+    embeddability = KAppNotEmbeddable;
+    newfile = KAppDoesNotSupportNewFile;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/data/CsHelp.rss	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,1163 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     Main resource file for the CsHelp application.
+*
+*
+*/
+
+
+//  RESOURCE IDENTIFIER
+NAME  HELP // 4 letter ID
+
+//  INCLUDES
+#include <eikon.rh>
+#include <eikon.rsg>
+#include <avkon.rsg>
+#include <avkon.rh>
+#include <avkon.mbg>
+#include <e32keys.h>
+#include <cshelp.mbg>
+#include <avkon.loc>
+#include <avkon.hrh>
+
+#include <appinfo.rh>
+
+#include <AiwCommon.rh>
+
+#include <data_caging_paths_strings.hrh>
+
+#include "CsHelp.hrh"
+#include <csxhelp.loc>
+#include "cshelp.laf"
+
+//  CONSTANTS  
+
+#define DRIVE "Z:"
+#define DIRPATH "\\"
+
+#ifdef RD_APPS_TO_EXES
+#define DIR APP_BITMAP_DIR DIRPATH 
+#else
+#define DIR "\\system\\apps\\cshelp\\"
+#endif
+
+#define FILE "cshelp.mbm"  
+
+#define FULLPATH DRIVE DIR FILE
+#define qtn_help_icon_bitmap_file   FULLPATH
+
+
+//  RESOURCE DEFINITIONS 
+
+RESOURCE RSS_SIGNATURE
+    {
+    }
+
+RESOURCE TBUF1
+    {
+    }
+
+RESOURCE EIK_APP_INFO
+    {
+    }
+
+
+
+////////////NEW:////////////////////////////////////////
+RESOURCE LOCALISABLE_APP_INFO r_cshelp_localisable_app_info
+    {
+    short_caption = qtn_apps_grid_help;   //This is shown in appmenu grid view (Csxhelp.loc)
+    caption_and_icon = 
+    CAPTION_AND_ICON_INFO
+        {
+        caption = qtn_apps_ls1_help;		//This is shown in appmenu list view (Csxhelp.loc)
+#ifdef __SCALABLE_ICONS
+        number_of_icons = 1;
+#ifdef RD_APPS_TO_EXES
+        icon_file = APP_BITMAP_DIR"\\Cshelp_aif.mif";
+ #else // !RD_APPS_TO_EXES
+        icon_file = "\\System\\Apps\\Cshelp\\Cshelp_aif.mif";
+ #endif // RD_APPS_TO_EXES
+#else
+        number_of_icons = 2;
+#ifdef RD_APPS_TO_EXES
+        icon_file = APP_BITMAP_DIR"\\Cshelp_aif.mbm";
+ #else // !RD_APPS_TO_EXES
+        icon_file = "\\System\\Apps\\Cshelp\\Cshelp_aif.mbm";
+ #endif // RD_APPS_TO_EXES
+#endif
+        };
+    }
+////////////NEW////////////////////////////////////////
+
+///CSX Start
+RESOURCE AVKON_VIEW r_CSXH_toc1
+{
+	menubar = r_CSXH_menubar;
+    cba = r_cshelp_softkeys_options_exit_open;
+}
+
+RESOURCE AVKON_VIEW r_TopicList
+    {
+    menubar = r_CSXH_menubar_TopicList;
+    cba = r_cshelp_softkeys_options_back_open;
+    }
+
+RESOURCE AVKON_VIEW r_KywdTOC1List
+    {
+    menubar = r_CSXH_menubar_KywdTOC1List;
+    cba = r_cshelp_softkeys_options_back_find;
+    }
+
+RESOURCE AVKON_VIEW r_KywdTOC2List
+    {
+    menubar = r_CSXH_menubar_KywdTOC2List;
+    cba = r_cshelp_softkeys_options_back_open;
+    }
+
+RESOURCE AVKON_VIEW r_TopicTextList
+    {
+    menubar = r_CSXH_menubar_TopicTextList;
+    cba = r_cshelp_softkeys_options_back;
+    }
+    
+RESOURCE AVKON_VIEW r_cshelp_topicforcontext
+    {
+    menubar = r_CSXH_menubar_TopicTextList;
+    cba = r_cshelp_softkeys_options_close;
+    }
+
+RESOURCE AVKON_VIEW r_cshelp_htmltopicview
+    {
+    menubar = r_CSXH_menubar_htmltopicview;  
+    cba = r_cshelp_softkeys_options_back_openlink;
+    }
+
+RESOURCE AVKON_VIEW r_cshelp_htmltopicforcontext
+    {
+    menubar = r_CSXH_menubar_htmltopicview;
+    cba = r_cshelp_softkeys_options_close_openlink;
+    }
+
+
+// ---------------------------------------------------------
+//   
+//   r_CSXH_menubar
+//   Menubar for CSXH example
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_BAR r_CSXH_menubar
+    {
+    titles =
+        {
+        MENU_TITLE {menu_pane = r_CSXH_menu;}
+        };
+    }
+
+
+// ---------------------------------------------------------
+//   
+//   r_CSXH_menu
+//   Menu for "Options"
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_CSXH_menu
+    {
+    items = 
+        {
+        MENU_ITEM {command = ECSXHOpenItem;  txt = qtn_help_om_open_category; flags = EEikMenuItemAction;},
+        MENU_ITEM {command = ECSXHSearchText;  txt = qtn_help_om_search_xhtml;},                
+        MENU_ITEM {command = EAknSoftkeyExit;   txt = qtn_options_exit;}
+        };
+    }
+
+
+
+//----------------------------------------------------
+//   
+//    r_cshelpsoftkey_cba_options_back
+//    Define cba for Context View
+//
+//----------------------------------------------------
+//
+//TSW Error:EAJA-6XLFTW :
+//S60 3.2 Help: Selection key opens Option menu in Topic view 
+//If MSK is not defined, "." appears in the MSK, 
+//On Middle key press, Options menu items are shown to the user 
+RESOURCE CBA r_cshelp_softkeys_options_back
+    {
+    buttons =
+        {
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyOptions;
+            txt = text_softkey_option;
+            },
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyBack;
+            txt = text_softkey_back;
+            },
+        AVKON_CBA_BUTTON
+            {
+            id = ECSXHDummyMSK;
+            txt = "";
+            }    
+        };
+    }
+        
+//----------------------------------------------------
+//   
+//    r_cshelpsoftkey_cba_options_close
+//    Define cba for Context View
+//
+//----------------------------------------------------
+//
+//TSW Error:EAJA-6XLFTW :
+//S60 3.2 Help: Selection key opens Option menu in Topic view 
+//If MSK is not defined, "." appears in the MSK, 
+//On Middle key press, Options menu items are shown to the user 
+RESOURCE CBA r_cshelp_softkeys_options_close
+    {
+    buttons =
+        {
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyOptions;
+            txt = text_softkey_option;
+            },
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyClose;
+            txt = text_softkey_close;
+            },
+        AVKON_CBA_BUTTON
+            {
+            id = ECSXHDummyMSK;
+            txt = "";
+            }    
+        };
+    }
+
+RESOURCE CBA r_cshelp_softkeys_options_close_openlink
+    {
+    buttons =
+        {
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyOptions;
+            txt = text_softkey_option;
+            },
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyClose;
+            txt = text_softkey_close;
+            },
+		AVKON_CBA_BUTTON
+            {
+            id = ECSXHOpenHyperLink;
+            txt = qtn_help_msk_open_hyperlink;
+            }            
+        };
+    }
+
+
+RESOURCE CBA r_cshelp_softkeys_options_back_open
+    {
+    buttons =
+        {
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyOptions;
+            txt = text_softkey_option;
+            },
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyBack;
+            txt = text_softkey_back;
+            },
+        AVKON_CBA_BUTTON
+            {
+            id = ECSXHOpenTopicText;
+            txt = qtn_msk_open;
+            }
+        };
+    }
+
+RESOURCE CBA r_cshelp_softkeys_options_exit_open
+    {
+    buttons =
+        {
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyOptions;
+            txt = text_softkey_option;
+            },
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyExit;
+            txt = text_softkey_exit;
+            },
+        AVKON_CBA_BUTTON
+            {
+            id = ECSXHOpenTopicText;
+            txt = qtn_msk_open;
+            }
+        };
+    }
+RESOURCE CBA r_cshelp_softkeys_options_exit_find
+    {
+    buttons =
+        {
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyOptions;
+            txt = text_softkey_option;
+            },
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyExit;
+            txt = text_softkey_exit;
+            },
+        AVKON_CBA_BUTTON
+            {
+            id = ECSXHOpenTopicText;
+            txt = qtn_help_msk_find;
+            }
+        };
+    }
+
+RESOURCE CBA r_cshelp_softkeys_options_back_find
+    {
+    buttons =
+        {
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyOptions;
+            txt = text_softkey_option;
+            },
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyBack;
+            txt = text_softkey_back;
+            },
+        AVKON_CBA_BUTTON
+            {
+            id = ECSXHOpenTopicText;
+            txt = qtn_help_msk_find;
+            }
+        };
+    }
+// ---------------------------------------------------------
+//   
+//   r_CSXH_menubar
+//   Menubar for CsXHelp example
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_BAR r_CSXH_menubar_TopicList
+    {
+    titles =
+        {
+        MENU_TITLE {menu_pane = r_CSXH_menu_TopicList;}
+        };
+    }
+
+RESOURCE MENU_BAR r_CSXH_menubar_KywdTOC1List
+    {
+    titles =
+        {
+        MENU_TITLE {menu_pane = r_CSXH_menu_KywdTOC1List;}
+        };
+    }
+
+RESOURCE MENU_BAR r_CSXH_menubar_KywdTOC2List
+    {
+    titles =
+        {
+        MENU_TITLE {menu_pane = r_CSXH_menu_KywdTOC2List;}
+        };
+    }
+
+
+// ---------------------------------------------------------
+//   
+//   r_CSXH_menu
+//   Menu for "Options"
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_CSXH_menu_TopicList
+    {
+    items = 
+        {
+        MENU_ITEM {command = ECSXHOpenTopicText;  txt = qtn_help_om_open_topic;flags = EEikMenuItemAction;},                
+        MENU_ITEM {command = ECSXHTOC1ListView;  txt = qtn_help_om_help_contents;},        
+        MENU_ITEM {command = ECSXHSearchText;  txt = qtn_help_om_search_xhtml;},                
+        MENU_ITEM {command = EAknSoftkeyExit;   txt = qtn_options_exit;}
+        };
+    }
+    
+RESOURCE MENU_PANE r_CSXH_menu_KywdTOC1List
+    {
+    items = 
+        {
+        MENU_ITEM {command = ECSXHOpenTopicText;  txt = qtn_help_om_find_topics; flags = EEikMenuItemAction;},                
+        MENU_ITEM {command = ECSXHTOC1ListView;  txt = qtn_help_om_help_contents;},        
+        MENU_ITEM {command = EAknSoftkeyExit;   txt = qtn_options_exit;}
+        };
+    }
+
+RESOURCE MENU_PANE r_CSXH_menu_KywdTOC2List
+    {
+    items = 
+        {
+        MENU_ITEM {command = ECSXHOpenTopicText;  txt = qtn_help_om_open_topic; flags = EEikMenuItemAction;},                
+        MENU_ITEM {command = ECSXHTOC1ListView;  txt = qtn_help_om_help_contents;},        
+        MENU_ITEM {command = ECSXHSearchText;  txt = qtn_help_om_search_xhtml;},                
+        MENU_ITEM {command = EAknSoftkeyExit;   txt = qtn_options_exit;}
+        };
+    }
+
+
+
+
+
+// ---------------------------------------------------------
+//   
+//   r_CSXH_menubar
+//   Menubar for CsXHelp example
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_BAR r_CSXH_menubar_htmltopicview
+    {
+    titles =
+        {
+        MENU_TITLE {menu_pane = r_CSXH_menu_htmltopicview;}
+        };
+    }
+
+
+// ---------------------------------------------------------
+//   
+//   r_CSXH_menubar
+//   Menubar for CsXHelp example
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_BAR r_CSXH_menubar_TopicTextList
+    {
+    titles =
+        {
+        MENU_TITLE {menu_pane = r_CSXH_menu_TopicTextList;}
+        };
+    }
+
+
+// ---------------------------------------------------------
+//   
+//   r_CSXH_menu
+//   Menu for "Options"
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_CSXH_menu_htmltopicview
+    {
+    items = 
+        {
+        MENU_ITEM {command = ECSXHOpenHyperLink;  txt = qtn_help_om_open_hyperlink;},    
+        MENU_ITEM {command = ECSXHOpenApplicationTopics;  txt = qtn_help_om_application_topics;},
+        MENU_ITEM {command = ECSXHTOC1ListView;  txt = qtn_help_om_help_contents;},
+        MENU_ITEM {command = ECSXHSearchText;  txt = qtn_help_om_search_xhtml;},        
+        MENU_ITEM { command=ECsHelpCmdFontLarge; txt=qtn_help_om_increase_text; },        	
+        MENU_ITEM { command=ECsHelpCmdFontSmall; txt=qtn_help_om_decrease_text; },        
+        MENU_ITEM {command = EAknSoftkeyExit;   txt = qtn_options_exit;}
+        };
+    }
+
+// ---------------------------------------------------------
+//   
+//   r_CSXH_menu
+//   Menu for "Options"
+//
+// ---------------------------------------------------------
+//
+RESOURCE MENU_PANE r_CSXH_menu_TopicTextList
+    {
+    items = 
+        {
+        MENU_ITEM {command = ECSXHOpenApplicationTopics;  txt = qtn_help_om_application_topics;},
+        MENU_ITEM {command = ECSXHTOC1ListView;  txt = qtn_help_om_help_contents;},
+        MENU_ITEM {command = ECSXHSearchText;  txt = qtn_help_om_search_xhtml;},
+        MENU_ITEM {command = EAknSoftkeyExit;   txt = qtn_options_exit;}
+        };
+    }
+    
+// ---------------------------------------------------------
+//   
+//   r_type_no_help_topics
+//   when a other app launches help, no topic is available,
+//   then information note with this text is displayed.
+// ---------------------------------------------------------
+//
+
+RESOURCE TBUF r_type_no_help_topics 
+    {
+    buf = qtn_help_note_no_topics;
+    }
+
+// ---------------------------------------------------------
+//   
+//   r_type_no_help_topics
+//   when help is unable to launch another application,
+//   then information note with this text is displayed.
+// ---------------------------------------------------------
+//
+
+RESOURCE TBUF r_qtn_help_note_unable_to_launch_app 
+    {
+    buf = qtn_help_note_unable_launch;
+    }
+
+// ---------------------------------------------------------
+//   
+//   r_type_no_help_topics
+//   when help is unable to launch another application,
+//   then information note with this text is displayed.
+// ---------------------------------------------------------
+//
+
+RESOURCE TBUF r_qtn_help_note_app_launch_not_allowed 
+    {
+    buf = qtn_help_note_no_internet;
+    }
+    
+//----------------------------------------------------
+//   
+//    r_cshelp_categorylist
+//    Define menubar and cba for Category List View
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_cshelp_categorylist
+    {
+    menubar = r_cshelp_menubar_categorylist;  
+    cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+    }
+
+//----------------------------------------------------
+//   
+//    r_cshelp_topiclist
+//    Define menubar and cba for Topic List View
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_cshelp_topiclist
+    {
+    menubar = r_cshelp_menubar_topiclist;  
+    cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+    }
+
+
+//----------------------------------------------------
+//   
+//    r_cshelp_topiclist
+//    Define menubar and cba for HTML Topic View
+//
+//----------------------------------------------------
+//
+
+
+RESOURCE CBA r_cshelp_softkeys_options_back_openlink
+    {
+    buttons =
+        {
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyOptions;
+            txt = text_softkey_option;
+            },
+        AVKON_CBA_BUTTON
+            {
+            id = EAknSoftkeyBack;
+            txt = text_softkey_back;
+            },
+		AVKON_CBA_BUTTON
+            {
+            id = ECSXHOpenHyperLink;
+            txt = qtn_help_msk_open_hyperlink;
+            }            
+        };
+    }
+
+
+//----------------------------------------------------
+//   
+//    r_cshelp_topic
+//    Define menubar and cba for Topic View
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_cshelp_topic
+    {
+    menubar = r_cshelp_menubar_topic;  
+    cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+    }
+
+//----------------------------------------------------
+//   
+//    r_cshelp_topicforsearch
+//    Define menubar and cba for Topic View For Search
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_cshelp_topicforsearch
+    {
+    menubar = r_cshelp_menubar_topic;  
+    cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+    }
+
+//----------------------------------------------------
+//   
+//    r_cshelp_search
+//    Define menubar and cba for Search View
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_cshelp_search
+    {
+    menubar = r_cshelp_menubar_search;  
+    cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+    }
+
+//----------------------------------------------------
+//   
+//    r_cshelp_searchresult
+//    Define menubar and cba for Search Result View
+//
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_cshelp_searchresult
+    {
+    menubar = r_cshelp_menubar_searchresult;  
+    cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+    }
+
+
+//----------------------------------------------------
+//   
+//    r_cshelp_menubar_categorylist
+//    Menubar for Category List View
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_cshelp_menubar_categorylist
+    {
+    titles = 
+        {
+        MENU_TITLE
+            {
+            menu_pane = r_cshelp_categorylist_menu;
+            }
+        };
+    }
+
+    
+//----------------------------------------------------
+//   
+//    r_cshelp_menubar_topiclist
+//    Menubar for Topic List View
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_cshelp_menubar_topiclist
+    {
+    titles = 
+        {
+        MENU_TITLE 
+            {
+            menu_pane = r_cshelp_topiclist_menu;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_cshelp_menubar_topic
+//    Menubar for Topic View
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_cshelp_menubar_topic
+    {
+    titles = 
+        {
+        MENU_TITLE 
+            {
+            menu_pane = r_cshelp_topic_menu;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_cshelp_menubar_search
+//    Menubar for Search View
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_cshelp_menubar_search
+    {
+    titles = 
+        {
+        MENU_TITLE
+            {
+            menu_pane = r_cshelp_search_menu;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_cshelp_menubar_searchresult
+//    Menubar for Search Result View
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_cshelp_menubar_searchresult
+    {
+    titles = 
+        {
+        MENU_TITLE 
+            {
+            menu_pane = r_cshelp_searchresult_menu;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_cshelp_categorylist_menu
+//    Menu pane for Category List View
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_cshelp_categorylist_menu
+    {
+    items = 
+        {
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewTopicList;
+            txt = qtn_help_om_open_category;
+            },
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewSearch;
+            txt = qtn_help_om_search;
+            },
+        MENU_ITEM
+            {
+            command = EAknCmdExit;
+            txt = qtn_options_exit;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_cshelp_topiclist_menu
+//    Menu pane for Topic List View
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_cshelp_topiclist_menu
+    {
+    items = 
+        {
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewTopic;
+            txt = qtn_help_om_open_topic;
+            },
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewCategoryList; 
+            txt = qtn_help_om_category_list;
+            },
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewSearch;
+            txt = qtn_help_om_search;
+            },
+        MENU_ITEM
+            {
+            command = EAknCmdExit;
+            txt = qtn_options_exit;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_cshelp_topic_menu
+//    Menu pane for Topic View
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_cshelp_topic_menu
+    {
+    items = 
+        {
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewTopicList;
+            txt = qtn_help_om_topic_list;
+            },
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewCategoryList;
+            txt = qtn_help_om_category_list; 
+            },
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewSearch;
+            txt = qtn_help_om_search;
+            },
+        MENU_ITEM
+            {
+            command = EAknCmdExit;
+            txt = qtn_options_exit;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_cshelp_search_menu
+//    Menu pane for Search View
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_cshelp_search_menu
+    {
+    items = 
+        {
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewSearchResult;
+            txt = qtn_help_om_find_topics;
+            },
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewCategoryList;
+            txt = qtn_help_om_category_list;
+            },
+        MENU_ITEM
+            {
+            command = EAknCmdExit;
+            txt = qtn_options_exit;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_cshelp_searchresult_menu
+//    Menu pane for Search Result View
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_cshelp_searchresult_menu
+    {
+    items = 
+        {
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewTopicForSearch;
+            txt = qtn_help_om_open_topic;
+            },
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewCategoryList;
+            txt = qtn_help_om_category_list;
+            },
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewSearch;
+            txt = qtn_help_om_search;
+            },
+        MENU_ITEM
+            {
+            command = EAknCmdExit;
+            txt = qtn_options_exit;
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_cshelp_context_menu
+//    Menu pane for Search Result View
+//
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_cshelp_context_menu
+    {
+    items = 
+        {
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewTopicForContext;
+            txt = qtn_help_om_open_topic;
+            },
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewCategoryList; 
+            txt = qtn_help_om_category_list;
+            },
+        MENU_ITEM
+            {
+            command = ECsHelpCmdViewSearch;
+            txt = qtn_help_om_search;
+            },
+        MENU_ITEM
+            {
+            command = EAknCmdExit;
+            txt = qtn_options_exit;
+            }
+        };
+    }
+
+
+// ---------------------------------------------------------
+//   
+//    r_cshelp_search_category_tabs
+//    Tab groups for navi pane of Search View and Category View
+//
+// ---------------------------------------------------------
+//
+RESOURCE TAB_GROUP r_cshelp_search_category_tabs
+    {
+    tab_width = EAknTabWidthWithTwoTabs;  // two tabs
+    tabs = 
+        {
+        TAB
+            {
+            id = ECsHelpCategoryTab;
+            bmpfile = qtn_help_icon_bitmap_file;
+            bmpid = EMbmCshelpQgn_prop_folder_tab2;             
+            bmpmask = EMbmCshelpQgn_prop_folder_tab2_mask;		
+            },
+        TAB
+            {
+            id = ECsHelpSearchTab;
+            bmpfile = qtn_help_icon_bitmap_file;
+            bmpid = EMbmCshelpQgn_prop_list_keyword_tab2;
+            bmpmask = EMbmCshelpQgn_prop_list_keyword_tab2_mask;
+            }
+        };
+    }
+            
+// ---------------------------------------------------------
+//   
+//   r_cshelp_search_progress_note
+//   Define progress note for searcing in search result view
+//
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_cshelp_search_progress_note
+    {
+    flags = EAknProgressNoteFlags;
+    buttons = R_AVKON_SOFTKEYS_EMPTY;
+    items =
+        {
+        DLG_LINE
+            {
+            type=EAknCtNote;
+            id=EProgressNote;
+
+            control= AVKON_NOTE
+                { 
+                layout = EProgressLayout;
+                singular_label = qtn_help_noteg_searching;
+                };
+            }
+        };
+    }
+
+// ---------------------------------------------------------
+//   
+//   r_cshelp_install_uninstall_note
+//   Define information flag for notifying installation
+//
+// ---------------------------------------------------------
+//
+RESOURCE DIALOG r_cshelp_install_uninstall_note
+    {
+    flags = EAknInformationNoteFlags;
+    buttons = R_AVKON_SOFTKEYS_EMPTY;
+    items =
+        {
+        DLG_LINE
+            {
+            type=EAknCtNote;
+            id=EInstallNote;
+
+            control= AVKON_NOTE
+                { 
+                layout = EGeneralLayout;
+                singular_label = qtn_help_noteg_install;
+                };
+            }
+        };
+    }
+    
+// ---------------------------------------------------------
+//   
+//   r_qtn_help_title_help
+//   Define title of category list view. 
+//
+// ---------------------------------------------------------
+//
+RESOURCE TBUF32 r_qtn_help_title_help
+    {
+    buf = qtn_help_title_help;
+    }
+
+// ---------------------------------------------------------
+//   
+//   r_qtn_help_note_no_topics
+//   when a other app launches help, no topic is available,
+//   then information note with this text is displayed.
+// ---------------------------------------------------------
+//
+RESOURCE TBUF80 r_qtn_help_note_no_topics
+    {
+    buf = qtn_help_note_no_topics;
+    }
+
+
+RESOURCE CBA r_softkeys_options_exit__options
+    {
+    buttons =
+        {
+        CBA_BUTTON {id=EAknSoftkeyOptions; txt = "Options";},
+        CBA_BUTTON {id=EAknSoftkeyExit; txt = "Exit"; },
+        CBA_BUTTON {id=EAknSoftkeyOptions; txt = "Options";}
+        };
+    }
+
+////////////////////////////////////////////////////////////////
+//[FIXME: The resource r_cshelp_topic_view_layout
+// is not used anymore. Instead TAknMultiLineTextLayout is used
+// (in CCsHelpTopicContainer::SizeChanged and 
+//  inCCsHelpTopicContainer::GetTextFormatL)
+// ---------------------------------------------------------
+//   
+//   r_cshelp_topic_view_layout
+//   Define layout of topic view.
+//
+// ---------------------------------------------------------
+//
+/*************************************************
+RESOURCE AVKON_LAYOUT_EDWIN r_cshelp_topic_view_layout
+    { 
+    font = topic_view_font;     //ELatinPlain12
+    C = topic_view_C;           //215 
+    l = topic_view_l;           //4
+    r = topic_view_r;           //5
+    B = topic_view_B;           //21
+    W = topic_view_W;           //167
+    J = topic_view_J;           //ELayoutAlignBidi
+    lines = topic_view_lines;   //8
+    nextB = topic_view_nextB;   //37
+    }
+****************************************************/
+
+// To let know what are the services that are provided
+RESOURCE AIW_INTEREST r_aiwtutorialapp_interest
+{
+    items =
+    {
+        AIW_CRITERIA_ITEM
+        {
+            id = ECmdAiwPlaceHolder;
+            serviceCmd = KAiwCmdHelp;
+            serviceClass = KAiwClassMenu;
+            contentType = "help/tutorial";
+            defaultProvider = 0x10281D09;
+            maxProviders = 1;
+        },
+        AIW_CRITERIA_ITEM
+        {
+            id = KPresentationExists;   // Use service cmd id as id
+            serviceCmd = KPresentationExists;
+            serviceClass = KAiwClassMenu;
+            contentType = "help/tutorial";
+            defaultProvider = 0x10281D09;
+            maxProviders = 1;
+        },
+        AIW_CRITERIA_ITEM
+        {
+            id = KPlayPresentation;
+            serviceCmd = KPlayPresentation;
+            serviceClass = KAiwClassMenu;
+            contentType = "help/tutorial";
+            defaultProvider = 0x10281D09;
+            maxProviders = 1;
+        }
+    };
+}
+// ---------------------------------------------------------
+//   
+//   qtn_memlo_ram_out_of_mem
+//   Text to display for low memory situations. 
+//
+// ---------------------------------------------------------	
+RESOURCE TBUF256 r_cshelp_retrieve_no_memory_text
+    {
+    buf = qtn_memlo_ram_out_of_mem;
+    }
+
+#ifdef FF_HELP_TUTORIAL_MERGE    
+// ---------------------------------------------------------
+//   
+//   qtn_memlo_ram_out_of_mem
+//   Text to display for low memory situations. 
+//
+// ---------------------------------------------------------	
+RESOURCE TBUF256 r_cshelp_tutorial_text
+    {
+    buf = qtn_help_toc_list_item_tutorial;
+    }
+#endif
+
+// ---------------------------------------------------------
+//   
+//   qtn_help_toc_app_helps
+//   One topic indicates for a collection of post-build helps,
+//   all installed helps should be put within it
+// ---------------------------------------------------------
+//
+RESOURCE TBUF80 r_cshelp_toc_app_helps
+    {
+    buf = qtn_help_toc_app_helps;
+    }
+  
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/data/Cshelp_reg.rss	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+#include <appinfo.rh>
+#include <cshelp.rsg>
+
+#include <data_caging_paths_strings.hrh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x10005234 // Cshelp application UID 
+
+RESOURCE APP_REGISTRATION_INFO
+    {
+    app_file = "Cshelp";
+#ifndef RD_APPS_TO_EXES
+    attributes = KAppBuiltAsDll;
+    localisable_resource_file = APP_RESOURCE_DIR"\\Cshelp\\Cshelp";
+#else
+   localisable_resource_file = APP_RESOURCE_DIR"\\Cshelp";
+#endif  
+    localisable_resource_id = R_CSHELP_LOCALISABLE_APP_INFO;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/data/lch.rh	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     Main resource file for the CsHelp application.
+*
+*
+*/
+
+
+// lch.rh
+
+#ifndef LCH_RH
+#define LCH_RH
+
+//
+// FROM EIKDEF.RH - avoids HlpModel requiring Eikon
+//
+STRUCT RSS_SIGNATURE
+    {
+    LONG signature=4;
+    SRLINK self;
+    }
+
+STRUCT TXT
+	{
+	LTEXT buf;
+	}
+
+#endif // LCH_RH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/data/lch.rss	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,32 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     Main resource file for the CsHelp application.
+*
+*
+*/
+
+
+// lch.rss
+
+NAME LCH1
+
+#include"lch.rh"
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TXT r_help_path
+	{
+	buf = "z:\\sys\\bin\\cshelp.exe";
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/group/HelpEngine.mmp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for Help Engine Library
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+TARGET        HelpEngine.dll
+TARGETTYPE    dll
+UID           0x10282350 0x0BC03CD8
+LANGUAGE_IDS
+
+CAPABILITY      CAP_CLIENT_DLL
+VENDORID        VID_DEFAULT
+
+SOURCEPATH    ../HelpEngine/src
+SOURCE        HelpEngine.cpp
+SOURCE            CSXHHelpContentBase.cpp
+SOURCE            CSXHHelpDataBase.cpp
+SOURCE            CSXHMainTopics.cpp
+SOURCE            CSXHKywdTopics.cpp
+SOURCE            CSXHGenericTOC1.cpp
+SOURCE            CSXHGenericTOC2.cpp
+SOURCE            CSXHHtmlTOC1.cpp
+SOURCE            CSXHHtmlTOC2.cpp
+SOURCE            CSXHLegacyTOC1.cpp
+SOURCE            CSXHLegacyTOC2.cpp
+SOURCE            CSXHContextTopic.cpp
+SOURCE            CSXHKywdTOC1.cpp
+SOURCE            CSXHXMLParseHandler.cpp
+SOURCE            CSXHHTMLContentParser.cpp
+SOURCE            CSXHLegacyContentParser.cpp
+SOURCE            CsHelpCmdLineParser.cpp
+SOURCE            CSXHRuntimeIndexing.cpp
+
+
+
+USERINCLUDE   ../HelpEngine/inc ../HelpEngine/rss
+
+// This is a SYSTEMINCLUDE macro containing the applications
+// layer specific include directories
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY	cone.lib	euser.lib	bafl.lib
+LIBRARY efsrv.lib charconv.lib   eikctl.lib       
+LIBRARY	senxml.lib xmlframework.lib	ezip.lib
+LIBRARY hlpmodel.lib platformenv.lib
+LIBRARY featmgr.lib 
+LIBRARY ptiengine.lib //Input Language variation changes
+
+#if defined(WINS)
+    deffile ./HelpEnginewinscw.def
+#else // #elif defined(ARM)
+    deffile ./HelpEnginearm.def
+#endif
+nostrictdef
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/group/HelpEnginearm.def	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,67 @@
+EXPORTS
+	_ZN13CCSXHHtmlTOC213GetKywdParentEv @ 1 NONAME
+	_ZN13CCSXHHtmlTOC216GetTopicContentLEv @ 2 NONAME
+	_ZN13CCSXHHtmlTOC219GetContentsFromUrlLERK7TDesC16P7CCoeEnvR15RFeatureControl @ 3 NONAME
+	_ZN15CCSXHLegacyTOC215GetLegacyParentEv @ 4 NONAME
+	_ZN15CCSXHLegacyTOC216GetTopicContentLEv @ 5 NONAME
+	_ZN16CCSXHGenericTOC114FillChildDataLEP12CDesC16Array @ 6 NONAME
+	_ZN16CCSXHGenericTOC19GetChildLERK7TDesC16 @ 7 NONAME
+	_ZN16CCSXHGenericTOC29GetParentEv @ 8 NONAME
+	_ZN17CCSXHContextTopic8GetTopicEv @ 9 NONAME
+	_ZN17CCSXHHelpDataBase13GetKywdTopicsEv @ 10 NONAME
+	_ZN17CCSXHHelpDataBase13GetMainTopicsEv @ 11 NONAME
+	_ZN17CCSXHHelpDataBase15GetContextTopicERK6TDesC8 @ 12 NONAME
+	_ZN17CCSXHHelpDataBase19GetHtmlTopicForUrlLERK7TDesC16 @ 13 NONAME
+	_ZN17CCSXHHelpDataBase20ClearAllTOC1ContentsEv @ 14 NONAME
+	_ZN17CCSXHHelpDataBase21GetKeywordSearchCountEv @ 15 NONAME
+	_ZN17CCSXHHelpDataBase28InitGenerateKeywordTOC2ListLEP13CCSXHKywdTOC1 @ 16 NONAME
+	_ZN17CCSXHHelpDataBase4NewLEP7CCoeEnvRK4TBufILi256EES5_ @ 17 NONAME
+	_ZNK13CCSXHHtmlTOC211GetHtmlUrlLER4TBufILi256EE @ 18 NONAME
+	_ZNK13CCSXHHtmlTOC214GetHelpContextER15TCoeHelpContext @ 19 NONAME
+	_ZNK20CCSXHHelpContentBase7GetNameEv @ 20 NONAME
+	_ZTI13CCSXHHtmlTOC1 @ 21 NONAME ; #<TI>#
+	_ZTI13CCSXHHtmlTOC2 @ 22 NONAME ; #<TI>#
+	_ZTI13CCSXHKywdTOC1 @ 23 NONAME ; #<TI>#
+	_ZTI15CCSXHKywdTopics @ 24 NONAME ; #<TI>#
+	_ZTI15CCSXHLegacyTOC1 @ 25 NONAME ; #<TI>#
+	_ZTI15CCSXHLegacyTOC2 @ 26 NONAME ; #<TI>#
+	_ZTI15CCSXHMainTopics @ 27 NONAME ; #<TI>#
+	_ZTI16CCSXHGenericTOC1 @ 28 NONAME ; #<TI>#
+	_ZTI17CCSXHContextTopic @ 29 NONAME ; #<TI>#
+	_ZTI17CCSXHHelpDataBase @ 30 NONAME ; #<TI>#
+	_ZTI19CCsHlpCmdLineParser @ 31 NONAME ; #<TI>#
+	_ZTI20CCSXHHelpContentBase @ 32 NONAME ; #<TI>#
+	_ZTI20CCSXHXMLParseHandler @ 33 NONAME ; #<TI>#
+	_ZTI22CCSXHHTMLContentParser @ 34 NONAME ; #<TI>#
+	_ZTI24CCSXHLegacyContentParser @ 35 NONAME ; #<TI>#
+	_ZTI25CCSXHXMLParseHandler_Kywd @ 36 NONAME ; #<TI>#
+	_ZTI29CCSXHXMLParseHandler_MetaFile @ 37 NONAME ; #<TI>#
+	_ZTI30CCSXHXMLParseHandler_IndexFile @ 38 NONAME ; #<TI>#
+	_ZTI31CCSXHXMLParseHandler_MasterKywd @ 39 NONAME ; #<TI>#
+	_ZTI35CCSXHXMLParseHandler_MasterMetaFile @ 40 NONAME ; #<TI>#
+	_ZTV13CCSXHHtmlTOC1 @ 41 NONAME ; #<VT>#
+	_ZTV13CCSXHHtmlTOC2 @ 42 NONAME ; #<VT>#
+	_ZTV13CCSXHKywdTOC1 @ 43 NONAME ; #<VT>#
+	_ZTV15CCSXHKywdTopics @ 44 NONAME ; #<VT>#
+	_ZTV15CCSXHLegacyTOC1 @ 45 NONAME ; #<VT>#
+	_ZTV15CCSXHLegacyTOC2 @ 46 NONAME ; #<VT>#
+	_ZTV15CCSXHMainTopics @ 47 NONAME ; #<VT>#
+	_ZTV16CCSXHGenericTOC1 @ 48 NONAME ; #<VT>#
+	_ZTV17CCSXHContextTopic @ 49 NONAME ; #<VT>#
+	_ZTV17CCSXHHelpDataBase @ 50 NONAME ; #<VT>#
+	_ZTV19CCsHlpCmdLineParser @ 51 NONAME ; #<VT>#
+	_ZTV20CCSXHHelpContentBase @ 52 NONAME ; #<VT>#
+	_ZTV20CCSXHXMLParseHandler @ 53 NONAME ; #<VT>#
+	_ZTV22CCSXHHTMLContentParser @ 54 NONAME ; #<VT>#
+	_ZTV24CCSXHLegacyContentParser @ 55 NONAME ; #<VT>#
+	_ZTV25CCSXHXMLParseHandler_Kywd @ 56 NONAME ; #<VT>#
+	_ZTV29CCSXHXMLParseHandler_MetaFile @ 57 NONAME ; #<VT>#
+	_ZTV30CCSXHXMLParseHandler_IndexFile @ 58 NONAME ; #<VT>#
+	_ZTV31CCSXHXMLParseHandler_MasterKywd @ 59 NONAME ; #<VT>#
+	_ZTV35CCSXHXMLParseHandler_MasterMetaFile @ 60 NONAME ; #<VT>#
+	_ZTI20CCSXHRuntimeIndexing @ 61 NONAME ; #<TI>#
+	_ZTV20CCSXHRuntimeIndexing @ 62 NONAME ; #<VT>#
+	_ZN17CCSXHHelpDataBase17GetAppHelpsTopicsEv @ 63 NONAME
+	_ZTI33CCSXHXMLParseHandler_RedirectFile @ 64 NONAME
+	_ZTV33CCSXHXMLParseHandler_RedirectFile @ 65 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/group/HelpEnginewinscw.def	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,23 @@
+EXPORTS
+	??1CCSXHHelpDataBase@@UAE@XZ @ 1 NONAME ; CCSXHHelpDataBase::~CCSXHHelpDataBase(void)
+	?ClearAllTOC1Contents@CCSXHHelpDataBase@@QAEXXZ @ 2 NONAME ; void CCSXHHelpDataBase::ClearAllTOC1Contents(void)
+	?FillChildDataL@CCSXHGenericTOC1@@UAEXPAVCDesC16Array@@@Z @ 3 NONAME ; void CCSXHGenericTOC1::FillChildDataL(class CDesC16Array *)
+	?GetChildL@CCSXHGenericTOC1@@UAEPAVCCSXHHelpContentBase@@ABVTDesC16@@@Z @ 4 NONAME ; class CCSXHHelpContentBase * CCSXHGenericTOC1::GetChildL(class TDesC16 const &)
+	?GetContentsFromUrlL@CCSXHHtmlTOC2@@SAPAVHBufC8@@ABVTDesC16@@PAVCCoeEnv@@AAVRFeatureControl@@@Z @ 5 NONAME ; class HBufC8 * CCSXHHtmlTOC2::GetContentsFromUrlL(class TDesC16 const &, class CCoeEnv *, class RFeatureControl &)
+	?GetContextTopic@CCSXHHelpDataBase@@QAEPAVCCSXHHelpContentBase@@ABVTDesC8@@@Z @ 6 NONAME ; class CCSXHHelpContentBase * CCSXHHelpDataBase::GetContextTopic(class TDesC8 const &)
+	?GetHelpContext@CCSXHHtmlTOC2@@QBEHAAVTCoeHelpContext@@@Z @ 7 NONAME ; int CCSXHHtmlTOC2::GetHelpContext(class TCoeHelpContext &) const
+	?GetHtmlTopicForUrlL@CCSXHHelpDataBase@@QAEPAVCCSXHHelpContentBase@@ABVTDesC16@@@Z @ 8 NONAME ; class CCSXHHelpContentBase * CCSXHHelpDataBase::GetHtmlTopicForUrlL(class TDesC16 const &)
+	?GetHtmlUrlL@CCSXHHtmlTOC2@@QBEXAAV?$TBuf@$0BAA@@@@Z @ 9 NONAME ; void CCSXHHtmlTOC2::GetHtmlUrlL(class TBuf<256> &) const
+	?GetKeywordSearchCount@CCSXHHelpDataBase@@QAEHXZ @ 10 NONAME ; int CCSXHHelpDataBase::GetKeywordSearchCount(void)
+	?GetKywdParent@CCSXHHtmlTOC2@@QAEPAVCCSXHKywdTOC1@@XZ @ 11 NONAME ; class CCSXHKywdTOC1 * CCSXHHtmlTOC2::GetKywdParent(void)
+	?GetKywdTopics@CCSXHHelpDataBase@@QAEPAVCCSXHGenericTOC1@@XZ @ 12 NONAME ; class CCSXHGenericTOC1 * CCSXHHelpDataBase::GetKywdTopics(void)
+	?GetLegacyParent@CCSXHLegacyTOC2@@QAEPAVCCSXHLegacyTOC1@@XZ @ 13 NONAME ; class CCSXHLegacyTOC1 * CCSXHLegacyTOC2::GetLegacyParent(void)
+	?GetMainTopics@CCSXHHelpDataBase@@QAEPAVCCSXHGenericTOC1@@XZ @ 14 NONAME ; class CCSXHGenericTOC1 * CCSXHHelpDataBase::GetMainTopics(void)
+	?GetName@CCSXHHelpContentBase@@QBE?AVTPtr16@@XZ @ 15 NONAME ; class TPtr16 CCSXHHelpContentBase::GetName(void) const
+	?GetParent@CCSXHGenericTOC2@@QAEPAVCCSXHGenericTOC1@@XZ @ 16 NONAME ; class CCSXHGenericTOC1 * CCSXHGenericTOC2::GetParent(void)
+	?GetTopic@CCSXHContextTopic@@QAEPAVCCSXHHelpContentBase@@XZ @ 17 NONAME ; class CCSXHHelpContentBase * CCSXHContextTopic::GetTopic(void)
+	?GetTopicContentL@CCSXHHtmlTOC2@@UAEPAXXZ @ 18 NONAME ; void * CCSXHHtmlTOC2::GetTopicContentL(void)
+	?GetTopicContentL@CCSXHLegacyTOC2@@UAEPAXXZ @ 19 NONAME ; void * CCSXHLegacyTOC2::GetTopicContentL(void)
+	?InitGenerateKeywordTOC2ListL@CCSXHHelpDataBase@@QAEHPAVCCSXHKywdTOC1@@@Z @ 20 NONAME ; int CCSXHHelpDataBase::InitGenerateKeywordTOC2ListL(class CCSXHKywdTOC1 *)
+	?NewL@CCSXHHelpDataBase@@SAPAV1@PAVCCoeEnv@@ABV?$TBuf@$0BAA@@@1@Z @ 21
+	?GetAppHelpsTopics@CCSXHHelpDataBase@@QAEPAVCCSXHGenericTOC1@@XZ @ 22
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/group/bld.inf	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     CsHelp build specification file.
+*
+*
+*/
+
+
+
+#ifdef __SERIES60_HELP //Help application will be present only when this flag is defined.
+
+#include <platform_paths.hrh>
+
+PRJ_EXPORTS
+// export localised loc file
+../loc/csxhelp.loc                          APP_LAYER_LOC_EXPORT_PATH(csxhelp.loc)
+
+// export iby file
+../rom/Cshelp.iby                           CORE_APP_LAYER_IBY_EXPORT_PATH(Cshelp.iby)
+../rom/AiwHelpProvider.iby                  CORE_APP_LAYER_IBY_EXPORT_PATH(AiwHelpProvider.iby)
+../rom/AiwHelpProviderResources.iby         LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(AiwHelpProviderResources.iby)
+../rom/CshelpResources.iby                  LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(CshelpResources.iby)
+
+
+PRJ_PLATFORMS
+// The platforms Cshelp is built
+// Default platforms 
+DEFAULT
+
+
+PRJ_MMPFILES
+
+HelpEngine.mmp
+cshelp.mmp
+
+#ifdef RD_HELP_AIW_INTEGRATION
+
+PRJ_EXPORTS
+// export localised loc file
+../AiwHelpProvider/loc/aiwxhelpprovider.loc        APP_LAYER_LOC_EXPORT_PATH(aiwxhelpprovider.loc)
+
+PRJ_MMPFILES
+../AiwHelpProvider/group/AiwHelpProvider.mmp
+#endif
+
+PRJ_EXTENSIONS
+
+START EXTENSION s60/mifconv
+OPTION TARGETFILE cshelp.mif
+OPTION HEADERFILE cshelp.mbg
+OPTION SOURCES	-c8,1 qgn_prop_folder_tab2          \
+				        -c8,1 qgn_prop_list_keyword_tab2    \
+				        -c8,1 qgn_prop_help_open_tab1       \
+				        -c8,1 qgn_prop_folder_help_tab1     \
+				        -c8,1 qgn_prop_keyword_find_tab1    \
+				        -c8 empty13x13
+END
+
+START EXTENSION s60/mifconv
+OPTION TARGETFILE cshelp_aif.mif
+OPTION SOURCES -c8,8 qgn_menu_help
+END
+
+#endif //__SERIES60_HELP 
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/group/cshelp.mmp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,123 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for Csxhelp Application
+*
+*/
+
+
+#include <data_caging_paths.hrh>
+#include <platform_paths.hrh>
+
+
+#ifndef RD_APPS_TO_EXES
+TARGETPATH  /System/Apps/Cshelp
+#endif
+
+//1. Cshelp resources
+START RESOURCE ../data/CsHelp.rss
+HEADER
+#ifdef RD_APPS_TO_EXES
+TARGETPATH APP_RESOURCE_DIR
+#endif
+
+//other settings like LANG  xx
+LANGUAGE_IDS
+
+END  // RESOURCE
+
+
+
+//2. Aif stuff
+#ifdef RD_SCALABLE_UI // New app framework used
+
+START RESOURCE ../data/Cshelp_reg.rss
+DEPENDS cshelp.rsg
+// Do not change the UID below.
+TARGETPATH /private/10003a3f/apps
+END
+
+#else // Old app framework used (no changes in the definitions below)
+
+START RESOURCE ../aif/cshelp_caption.rss     
+HEADER
+#ifdef RD_APPS_TO_EXES
+TARGETPATH APP_RESOURCE_DIR
+#endif
+
+//other settings like LANG  xx
+LANGUAGE_IDS
+END  // RESOURCE
+
+#endif
+
+
+
+//Target information
+#ifdef RD_APPS_TO_EXES
+// TARGETPATH need not be defined, it is automatically handled by the build tools
+TARGET          cshelp.exe
+TARGETTYPE      exe
+#else
+TARGET          cshelp.app
+TARGETTYPE      app
+#endif
+UID             0x100039CE 0x10005234
+
+EPOCSTACKSIZE   0x10000
+EPOCHEAPSIZE 0x5000 0x800000
+
+VENDORID        VID_DEFAULT
+
+//We use default capabilities (from defaultcaps.hrh)
+CAPABILITY CAP_APPLICATION 
+
+USERINCLUDE . ../inc ../HelpEngine/inc
+
+// This is a SYSTEMINCLUDE macro containing the applications
+// layer specific include directories
+APP_LAYER_SYSTEMINCLUDE
+
+SOURCEPATH   ../src
+
+SOURCE CSXH.cpp
+SOURCE CSXHApplication.cpp 
+SOURCE CSXHGenericView.cpp
+SOURCE CSXHGenericContainer.cpp
+SOURCE CSXHAppUi.cpp
+SOURCE CSXHDocument.cpp 
+SOURCE CSXHLegacyTopicContainer.cpp
+SOURCE CSXHLegacyTopicView.cpp
+SOURCE CSXHHtmlTopicView.cpp
+SOURCE CSXHHtmlTopicContainer.cpp
+SOURCE AppLauncherForCSXH.cpp
+SOURCE csxhruntimeappwatcher.cpp
+
+LIBRARY euser.lib apparc.lib cone.lib eikcore.lib
+LIBRARY apgrfx.lib charconv.lib 
+LIBRARY eikcoctl.lib eikctl.lib avkon.lib
+LIBRARY aknnotify.lib etext.lib
+LIBRARY aknskins.lib
+LIBRARY ws32.lib 
+LIBRARY CdlEngine.lib   //dynamic ui 
+LIBRARY AknLayout2Scalable.lib
+LIBRARY gdi.lib HelpEngine.lib apmime.lib featmgr.lib
+LIBRARY servicehandler.lib // For the AiwServiceHandler
+LIBRARY efsrv.lib
+
+#ifdef FF_HELP_TUTORIAL_MERGE
+LIBRARY bafl.lib 
+#endif
+
+DEBUGLIBRARY flogger.lib
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/inc/AppLauncherForCSXH.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,234 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  AppLauncherForCSXH class declaration
+*
+*/
+
+
+#ifndef INC_APPLAUNCHERFORCSXH_H_HEADER_INCLUDED_BC03B1F7
+#define INC_APPLAUNCHERFORCSXH_H_HEADER_INCLUDED_BC03B1F7
+
+#include <e32std.h> 
+#include <apgtask.h> 
+
+class TApaTask;
+
+const TInt KMaxParamLength = 32;
+const TInt KMaxVSAPrefix = 32;
+const TInt KMaxVSAScheme = 88;
+const TInt KBackSlashLength = 1;
+/**
+ *  AppLauncherForCSXH 
+ *  This class implements launching applications from help
+ *  @since S60 v3.2
+ */
+class AppLauncherForCSXH 
+    {
+    public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a AppLauncherForCSXH 
+*  and return a pointer to the created object
+*  @return a AppLauncherForCSXH Pointer 
+*/
+    static AppLauncherForCSXH* NewL();
+    
+/** 
+*  @function ~AppLauncherForCSXH
+*  @since S60 3.2
+*  Destroy the object and release all memory objects
+*/    
+      ~AppLauncherForCSXH();
+/** 
+*  @function LaunchAppL
+*  @since S60 3.2
+*  Launches Application
+*  @param aUrl  - Buffer which contains iformation about Application Uid,MessageId, ViewID 
+*         aCurrentUrl - Currently displayed file path info
+*  @return ETrue, if Application Launches Successfully, EFalse otherwise	
+*/      
+      TBool LaunchAppL(const TDesC& aUrl,const TDesC& aCurrentUrl); 
+/** 
+*  @function LaunchBrowserNGL
+*  @since S60 3.2
+*  Launches BrowserNG Application
+*  @param aUrl  - external hyperlink info.
+*  @return ETrue, if Application Launches Successfully, EFalse otherwise	
+*/      
+      void LaunchBrowserNGL(const TDesC& aUrl);     	     	
+    private:
+
+/** 
+*  @function AppLauncherForCSXH
+*  @since S60 3.2
+*  Perform the first phase of two phase construction
+*/ 
+     AppLauncherForCSXH();
+     
+/** 
+*  @function ConstructL
+*  @since S60 3.2
+*  Perform the second phase construction of a legacytopicview object
+*/     
+     void ConstructL();
+/** 
+*  @function GetAppLaunchModeL
+*  @since S60 3.2
+*  Get the Mode Application Launch Command / View Switch Architecture
+*  @param 	aUrl  - Buffer which contains iformation about Application Uid,MessageId, ViewID 
+*   		aCurrentUrl - Currently displayed file path info
+*  @return  Mode of Launch
+*/    
+      TInt GetAppLaunchModeL(const TDesC& aUrl,const TDesC& aCurrentUrl);       
+/** 
+*  @function LaunchApp
+*  @since S60 3.2
+*  Launch the Application
+*  @param 	aUrl  - Buffer which contains iformation about Application Uid,MessageId, ViewID 
+*   		aVSAMode - Etrue for View Switch Architecture - EFalse for Command Launch
+*  @return  ETrue, Application Launch Successful, EFalse otherwise
+*/      
+      TBool LaunchApp(const TDesC& aUrl, TBool aVSAMode = ETrue);
+/** 
+*  @function LaunchCmdApp
+*  @since S60 3.2
+*  Launch the Application 
+*  @param 	aParamsMode  - ETrue, If Application has to be launched with Message. 
+*  @return  ETrue, Application Launch Successful, EFalse otherwise
+*/      
+      TBool LaunchCmdApp(TBool aParamsMode = ETrue);
+/** 
+*  @function LaunchCmdAppL
+*  @since S60 3.2
+*  Launch the Application using Command line APIs with parameters
+*  @param 	aParamsMode  - ETrue, If Application has to be launched with Message. 
+*  @return  ETrue, Application Launch Successful, EFalse otherwise
+*/     
+      TBool LaunchCmdAppL(TBool aParamsMode);
+  /** 
+*  @function GetCmdAppTask
+*  @since S60 3.2
+*  Launch the Application using Command line APIs with parameters
+*  @return  Get the TApaTask of the Launched Application
+*/      
+      TApaTask GetCmdAppTask();
+/** 
+*  @function SendMsgToCmdAppTaskL
+*  @since S60 3.2
+*  Send the Message to the Launched Application
+*  @param 	aTask  - TApaTask of the launched Application 
+*/      
+      void SendMsgToCmdAppTaskL(TApaTask &aTask);
+
+/** 
+*  @function HandleFailedAppLauchL
+*  @since S60 3.2
+*  Gives Information Note if Application Launch Failed.
+*/      
+      void HandleFailedAppLauchL();
+
+/** 
+*  @function HandleAppLauchFromInternetL
+*  @since S60 3.2
+*  Gives Information Note if user try to Launch the application from the external link
+*/      
+      void HandleAppLauchFromInternetL();
+/** 
+*  @function CheckAppLaunchFromInternetL
+*  @since S60 3.2
+*  Checks wether using is trying to launch the application from  external link
+*  @param aCurrentMode - VSA / Cmd
+*		  aCurrentUrl  - Currently displayed file path info
+*/  
+      TInt CheckAppLaunchFromInternetL(TInt aCurrentMode,const TDesC& aCurrentUrl );
+
+/** 
+*  @function CheckMsgParams
+*  @since S60 3.2
+*  Checks wether parameters are Valid / Invalid
+*  @param Buffer which contains iformation about Application Uid,MessageId, ViewID 
+*  @return EParamsWithMsg / EParamsInvalid / EParamsNoMsg
+*/      
+      TInt CheckMsgParams(const TDesC& aUrl);
+
+/** 
+*  @function CheckMsgParams
+*  @since S60 3.2
+*  Copies Uid & View Id into Variables
+*  @param Buffer which contains information about Application Uid,ViewID 
+*/ 
+      void ExtractTwoParams(const TDesC& aUrl);
+
+/** 
+*  @function ExtractFourParams
+*  @since S60 3.2
+*  Copies Uid, View Id, MessageId & Message into Variables
+*  @param aUrl - Buffer which contains information about Application Uid,ViewID, MessageId &  
+*/ 
+      void ExtractFourParams(const TDesC& aUrl);     
+/** 
+*  @function GetUid
+*  @since S60 3.2
+*  Coverts Buffer Content to TInt
+*  @param aUid - Application Uid 
+*		  aResult - Application Uid	
+*/
+      void GetUid(TPtrC aUid, TInt32 &aResult);       
+
+/** 
+*  @function SendMsgToBrowserNGL
+*  @since S60 3.2
+*  Send the Message to the BrowserNG
+*  @param aUrl - External Hyper Link
+*  @return ETrue MessageSent Successfully, EFalse otherwise
+*/      
+	  TBool SendMsgToBrowserNGL(const HBufC* aUrl);		
+/** 
+*  @function StartTimer
+*  @since S60 3.2
+*  Starts the timer
+*  @param aCallBack - Callback function for timer
+*/      
+	  void StartTimer(TCallBack aCallBack);
+
+/** 
+*  @function Timer_Callback_to_TerminateApp
+*  @since S60 3.2
+*  Timer callback function
+*  @param aPtr - AppLauncherForCSXH class pointer
+*  @return 0
+*/      
+      static TInt Timer_Callback_to_TerminateApp(TAny* aPtr);
+
+/** 
+*  @function SendMsgToApplication
+*  @since S60 3.2
+*  SendMessage to BrowserNG Application
+*  @return 0
+*/     
+      TInt SendMsgToApplication();    		 
+      
+    private:
+	  CPeriodic* iTimer;
+	  TInt iCount;
+	  TBuf<KMaxFileName> iUrl;      
+      TBuf<KMaxParamLength> iParam1;
+      TBuf<KMaxParamLength> iParam2;
+      TBuf<KMaxParamLength> iParam3;
+      TBuf<KMaxParamLength> iParam4;	  
+    };    
+		
+
+#endif /* INC_APPLAUNCHERFORCSXH_H_HEADER_INCLUDED_BC03B1F7 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/inc/CSXHAppUi.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,274 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHAppUi class declaration
+*
+*/
+
+
+#ifndef INC_CSXHAPPUI_H_HEADER_INCLUDED_BC054CBF
+#define INC_CSXHAPPUI_H_HEADER_INCLUDED_BC054CBF
+
+#include <aknViewAppUi.h>
+#include "AppLauncherForCSXH.h"
+#include "csxhruntimeappwatcher.h"
+
+//Forward declarations
+class CCSXHHtmlTopicView;
+class CCSXHLegacyTopicView;
+class CCSXHGenericView;
+#ifdef FF_HELP_TUTORIAL_MERGE
+class CAiwGenericParamList;
+class CAiwServiceHandler;
+#endif // FF_HELP_TUTORIAL_MERGE
+
+// CLASS DECLARATION
+
+/** 
+* @class CCSXHAppUi
+* Application UI class
+* Provides support for the following features:
+* - view architecture
+*/
+class CCSXHAppUi : public CAknViewAppUi,
+                   public MInstallationObserver
+    {
+  public:
+/** 
+ * @function ConstructL
+ * @since S60 3.2
+ * Perform the second phase construction of a CCSXHAppUi object this needs
+ * to be public due to the way the framework constructs the AppUi      
+ */
+    void ConstructL();
+/** 
+ * @function CCSXHAppUi
+ * @since S60 3.2
+ * Perform the first phase of two phase construction. This needs to be
+ * public due to the way the framework constructs the AppUi
+ */    
+    CCSXHAppUi();
+/** 
+ * @function ~CCSXHAppUi
+ * @since S60 3.2
+ * Destroy the object and release all memory objects
+ */    
+    ~CCSXHAppUi();
+
+/** 
+ * @function ~CCSXHAppUi
+ * @since S60 3.2  
+ * From CEikAppUi, takes care of command handling.
+ * @param aCommand command to be handled
+ */    
+    void HandleCommandL(TInt aCommand);
+    
+/** 
+ *  @function PropagateResourceChange
+ *  @since S60 3.2
+ *  Propagates the resource change event to all views
+ *  @param aType - Type of resource change event
+ */		
+	void PropagateResourceChange(TInt aType);     
+    
+/** 
+ * @function GetInstance
+ * @since S60 3.2  
+ * returns Application UI class pointer 
+ * @return Application UI class pointer 
+ */     
+    static CCSXHAppUi* GetInstance();
+
+/** 
+ * @function GetWsSession
+ * @since S60 3.2  
+ * returns WsSession Pointer
+ * @return WsSession pointer
+ */    
+	static RWsSession& GetWsSession();
+
+/** 
+ * @function GetCoeEnv
+ * @since S60 3.2  
+ * returns Control Environment pointer
+ * @return Control Environment pointer
+ */	
+	static CCoeEnv* GetCoeEnv();
+
+/** 
+ * @function AppLaunchL
+ * @since S60 3.2  
+ * Launch the Application based on Uid & ViewId
+ * @param aAppId Application Uid
+ * 		 aVId   ViewId 
+ */	    
+    void AppLaunchL(TInt32 &aAppId,TInt32 &aVId);
+    
+/** 
+ * @function AppLaunchL
+ * @since S60 3.2  
+ * Launch the Application based on Uid,ViewId, MessageId & Message
+ * @param aAppId   Application Uid
+ * 		 aVId     ViewId
+ * 		 aMsgId   MessageId
+ * 		 aParams  Message
+ */    
+    void AppLaunchL(TInt32 &aAppId,TInt32 &aVId,TInt32 &aMsgId,
+    									const TBuf<KMaxParamLength>& aParams);
+    
+/** 
+ * @function ResetTOC2ViewContainer
+ * @since S60 3.2  
+ * Sets a flag in the View for recreating the container 
+ */    
+    void ResetTOC2ViewContainer();
+/**
+* From MInstallationObserver
+* @function RuntimeUpdateIndex 
+* call back function once install/uninstall happens
+*
+* @since 5.0
+*/
+    void RuntimeUpdateIndex();
+
+#ifdef FF_HELP_TUTORIAL_MERGE
+    /**
+    *  Generates parameter list for AIW calls
+    *  @since S60 3.2
+    *  @param aContext The help content ready to Tutorial
+    *  @return The Aiw Generic Param List
+    */
+    CAiwGenericParamList* NewParamListLC(const TCoeHelpContext& aContext);
+
+    /**
+    *  If tutorial exists,call play presentation command
+    *  @since S60 3.2
+    *  @param None
+    *  @return None
+    */
+    void CallTutorialAiwProviderL();
+
+    /**
+    *  If tutorial exists,call play presentation command
+    *  @since S60 3.2
+    *  @param aTCoeHelpContext The Help Content stored
+    *  @return None
+    */
+    void SetHelpContext(TCoeHelpContext aTCoeHelpContext);
+
+    /**
+    *  If the presentation requsted exist or not
+    *  @since S60 3.2
+    *  @param None
+    *  @return A boolean value to indicate the presentation exist or not
+    */
+     TBool IsApplicationPresentInTutorialL();
+
+#endif // FF_HELP_TUTORIAL_MERGE
+	protected: 
+	// Functions from base calsses
+	/**
+    * Handles changes in keyboard focus when an application switches to, 
+    * or from, the foreground.
+    * @param aForeground @c ETrue if the application is in the foreground,
+    * otherwise @c EFalse.
+    */
+	void HandleForegroundEventL(TBool aForeground);
+/** 
+ * @function ProcessCommandParametersL
+ * From CEikAppUi.
+ * Take care of command parameter
+ * @since 3.2
+ * @param aTail should be contexts in TDesC8& form
+ * @return whether or not processing was successful
+ */
+        TBool ProcessCommandParametersL(TApaCommand aCommand,
+                                        TFileName& /* aDocumentName */,
+                                        const TDesC8& aTail);
+
+/**
+ * @function HandleMessageL 
+ * From MCoeMessageObserver
+ * Take care of messages from other app.
+ * @since 3.2
+ * @param aMessageParameters should be contexts in TDesC8&
+ * @return always EMessageHandled.
+ */
+    MCoeMessageObserver::TMessageResponse HandleMessageL(
+                                  TUint32 aClientHandleOfTargetWindowGroup,
+                                  TUid aMessageUi,
+                                  const TDesC8& aMessageParameters); 
+  private:
+/**
+ * @function ActivateDisplayTopicViewL   
+ * Take care of Recreating the Container Class for Specific Views
+ * @since 3.2
+ * @param aMessageParameters should be contexts in TDesC8&
+ * @return always EMessageHandled.
+ */  
+  	void ActivateDisplayTopicViewL();
+  	
+  	void InitDisplayTopicViewL(TUid aViewID);
+/**
+ * @function HandleContextSensitiveLaunchL   
+ * Take care of Context Sensitive Launch.
+ * @since 3.2
+ * @param aMessageParameters should be contexts in TDesC8&
+ * @return always EMessageHandled.
+ */  	
+  	void HandleContextSensitiveLaunchL(const TDesC8& aContext );   
+#ifdef FF_HELP_TUTORIAL_MERGE
+        /**
+        *  Load Service Handler and attach the interest
+        *  @since S60 3.2
+        *  @param None
+        *  @return None
+        */
+        void LoadTutorialServiceL();
+#endif
+  private:
+    
+    CCSXHGenericView* iTOC1View;
+    CCSXHGenericView* iKywdTOC1View;
+    
+    CCSXHLegacyTopicView* iLegacyTopicView;
+    CCSXHLegacyTopicView* iLegacyContextTopicView;
+    
+    //This class will be used for both normal and context html topics    
+    CCSXHHtmlTopicView* iHtmlTopicView;
+	
+	CCSXHGenericView* iKywdTOC2View;
+	CCSXHGenericView* iTOC2View;
+	CCSXHGenericView* iAppHelpsTOC1View;
+	CCSXHGenericView* iAppHelpsTOC2View;
+	
+	static CCSXHAppUi* iInstance;
+	CCSXHRuntimeAppWatcher* iRuntimeWatcher;
+	
+#ifdef FF_HELP_TUTORIAL_MERGE
+
+        //AIW Service Handler
+        //Owned
+        CAiwServiceHandler* iServiceHandler;
+
+        //Tutorial exist or not
+        TBool iTutorialExists;
+
+        //Help Content Text
+        TCoeHelpContext iTCoeHelpContext;
+#endif
+    };
+
+
+
+#endif /* INC_CSXHAPPUI_H_HEADER_INCLUDED_BC054CBF */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/inc/CSXHApplication.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHApplication class declaration
+*
+*/
+
+
+
+#ifndef INC_CSXHAPPLICATION_H__
+#define INC_CSXHAPPLICATION_H__
+
+#include <aknapp.h>
+
+
+/*! 
+  @class CCSXHApplication
+  
+  An instance of CCSXHApplication is the application part of the AVKON
+  application framework for the Csxhelp application
+  */
+class CCSXHApplication : public CAknApplication
+    {
+public:  // from CAknApplication
+
+/** 
+  @function AppDllUid
+  @since S60 3.2
+  
+  The application DLL UID value
+  @return the UID of this Application/Dll
+  */
+    TUid AppDllUid() const;
+
+protected: // from CAknApplication
+/** 
+  @function CreateDocumentL
+  @since S60 3.2
+  
+  Create a CApaDocument object and return a pointer to it
+  @return a pointer to the created document
+  */
+    CApaDocument* CreateDocumentL();
+    };
+
+#endif // INC_CSXHAPPLICATION_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/inc/CSXHDocument.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,210 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHDocument class declaration
+*
+*/
+
+
+#ifndef INC_CSXHDOCUMENT_H_HEADER_INCLUDED_BC0121B7
+#define INC_CSXHDOCUMENT_H_HEADER_INCLUDED_BC0121B7
+
+#include <AknDoc.h>
+
+// Forward references
+class CAknAppUi;
+class CEikApplication;
+class CCSXHHelpDataBase;
+class CCSXHHelpContentBase;
+class CEikAppUi;
+class CEikProgressInfo;
+class CAknProgressDialog;
+class CIdle;
+/** 
+  @class CCSXHDocument
+* An instance of class CCSXHDocument is the Document part of the AVKON
+* application framework for the Csxhelp application
+*/
+
+class CCSXHDocument : public CAknDocument
+    {
+    public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHDocument for the AVKON application aApp 
+*  construction, and return a pointer to the created object
+*  @param aApp - Application Object
+*  @return a CCSXHDocument Pointer 
+*/
+	static CCSXHDocument* NewL(
+	// application creating this document
+	CEikApplication& aApp);
+    // Construct a CCSXHDocument for the AVKON application aApp using two phase
+    // construction, and return a pointer to the created object
+
+/** 
+*  @function NewLC
+*  @since S60 3.2
+*  Construct a CCSXHDocument for the AVKON application aApp using two phase
+*  construction, and return a pointer to the created object
+*  @param aApp - Application Object
+*  @return a CCSXHDocument Pointer 
+*/
+    static CCSXHDocument* NewLC(
+	// application creating this document
+	CEikApplication& aApp);
+
+
+/** 
+*  @function ~CCSXHDocument
+*  @since S60 3.2
+*  Destroy the object and release all memory objects
+*/
+	    ~CCSXHDocument();
+
+	public: // from CAknDocument
+/** 
+*  @function CreateAppUiL
+*  @since S60 3.2
+*  Create a CCSXHAppUi object and return a pointer to it
+*  @return CCSXHAppUi class pointer
+*/		
+  	    CEikAppUi* CreateAppUiL();
+	    
+  	public:
+/** 
+*  @function SetDisplayTopic
+*  @since S60 3.2
+*  @param aDisplayTopic - HelpContentbase Class pointer
+*/  	
+		void SetDisplayTopic(CCSXHHelpContentBase *aDisplayTopic);
+/** 
+*  @function SetDisplayAndPrevTopic
+*  @since S60 3.2
+*  @param aDisplayTopic - HelpContentbase Class pointer
+*/  	
+		void SetDisplayAndPrevTopic(CCSXHHelpContentBase *aDisplayTopic);
+/** 
+*  @function GetDisplayTopic
+*  @since S60 3.2
+*  @return HelpContentBase Class pointer
+*/ 
+   inline  CCSXHHelpContentBase* GetDisplayTopic() const 
+   {return iDisplayTopic;}
+/** 
+*  @function GetPrevTopic
+*  @since S60 3.2
+*  @return HelpContentBase Class pointer
+*/		
+	inline CCSXHHelpContentBase* GetPrevTopic() const
+	{return iPrevTopic;}
+/** 
+*  @function ClearPrevTopic
+*  @since S60 3.2
+*  @Clears the previous topic
+*/		
+	inline void ClearPrevTopic()
+	{iPrevTopic = NULL;}
+/** 
+*  @function GetHelpDataBase
+*  @since S60 3.2
+*  @return HelpContentBase Class pointer
+*/		
+ 	inline CCSXHHelpDataBase* GetHelpDataBase() const
+ 	{return iHelpDataBase;}
+
+/** 
+*  @function GetHelpDataBase
+*  @since S60 3.2
+*  Sends a Command to Application UI Class
+*  @param aCommand - Command to be Handled
+*/		
+	 	void SendMessageToAppUiL(TInt aCommand);
+
+/** 
+*  @function SetContextTopicAsDisplayTopicL
+*  @since S60 3.2
+*  Parse the Message, Get the topic for Display & set this Object as Current Display Object
+*  @param aContextMessage - Message from Other Application for Context Sensitive launch
+*  @return  ETrue for Topic Found /EFalse for topic Not found
+*/	 	
+	 	TBool SetContextTopicAsDisplayTopicL(const TDesC8& aContextMessage);
+
+/** 
+*  @function GetHtmlTopicForUrlL
+*  @since S60 3.2
+*  Get the Object for HTML topic using url Name
+*  @param url - url Name
+*  @return Pointer to the HelpDataBase which contains HTMLtopic info
+*/	 	
+	 	CCSXHHelpContentBase* GetHtmlTopicForUrlL(const TDesC &url);
+
+/** 
+*  @function InitProgressBar
+*  @since S60 3.2
+*  Initializes the progress bar
+*/	 	
+	    void InitProgressBarL();
+
+/** 
+*  @function FreeProgressBar
+*  @since S60 3.2
+*  Frees the progress bar
+*/	 	
+	 	void FreeProgressBarL();
+	 	
+/**
+        * function for TCAllBack protocol.
+        * called directly
+        * @since 1.1
+        * @param aThis is the pointer to the actual instance
+        * @return Whether finished or not
+        */
+        static TInt CallBack(TAny* aThis);
+        
+        /**
+        * call back function.
+        * called by CallBackL()
+        * @since 1.1
+        * @return Whether finished or not
+        */
+        TInt DoCallBackL();	 	
+	 	
+	private:
+/** 
+*  @function CCSXHDocument
+*  @since S60 3.2
+*  Perform the first phase of two phase construction
+*/
+	    CCSXHDocument(
+	// application creating this document
+	CEikApplication& aApp);
+  
+  	private:  
+    	CCSXHHelpDataBase *iHelpDataBase;
+    	CAknAppUi *iHelpAppUi;
+    	
+    	CCSXHHelpContentBase *iDisplayTopic;
+    	CCSXHHelpContentBase *iPrevTopic;
+    	
+    	CAknProgressDialog *iProgressDialog;
+    	
+    	CIdle *iIdle;
+    	
+    	TInt iTotalKeywordsInResultView;
+    };
+
+
+
+#endif /* INC_CSXHDOCUMENT_H_HEADER_INCLUDED_BC0121B7 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/inc/CSXHGenericContainer.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,252 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHGenericContainer class declaration
+*
+*/
+
+
+#ifndef INC_CSXHGENERICCONTAINER_H_HEADER_INCLUDED_BC039735
+#define INC_CSXHGENERICCONTAINER_H_HEADER_INCLUDED_BC039735
+
+#include <coecntrl.h> // CCoeControl
+#include <eiklbo.h> // MEikListBoxObserver
+#include <aknsfld.h>
+
+// FORWARD DECLARATIONS
+class CAknSingleStyleListBox;
+class CCSXHDocument;
+class CCSXHGenericView;
+
+#ifdef FF_HELP_TUTORIAL_MERGE
+class CCSXHGenericTOC1;
+#endif
+
+// CLASS DECLARATION
+/**
+* @class CCSXHGenericContainer
+* This class provides listbox container control functionality
+*/
+
+class CCSXHGenericContainer : public CCoeControl, public MEikListBoxObserver
+    {
+    public:
+    /**
+    *  @function NewL
+    *  @since S60 3.2
+    *  Construct a CCSXHGenericContainer
+    *  and return a pointer to the created object
+    *  @param aRect - TRect Object
+    *         aDocument - Document Object
+    *  @return a CCSXHGenericContainer Pointer
+    */
+#ifdef FF_HELP_TUTORIAL_MERGE
+        static CCSXHGenericContainer* NewL(const TRect& aRect,CCSXHDocument &aDocument
+        ,CCSXHGenericView* aView);
+#else // !FF_HELP_TUTORIAL_MERGE
+        static CCSXHGenericContainer* NewL(const TRect& aRect,CCSXHDocument &aDocument);
+#endif // FF_HELP_TUTORIAL_MERGE
+    /**
+    *  @function NewLC
+    *  @since S60 3.2
+    *  Construct a CCSXHGenericContainer first phase of two phase constuction
+    *  @param aRect - TRect Object
+    *         aDocument - Document Object
+    */
+#ifdef FF_HELP_TUTORIAL_MERGE
+        static CCSXHGenericContainer* NewLC(const TRect& aRect, CCSXHDocument &aDocument
+        ,CCSXHGenericView* aView);
+#else // !FF_HELP_TUTORIAL_MERGE
+        static CCSXHGenericContainer* NewLC(const TRect& aRect, CCSXHDocument &aDocument);
+#endif // FF_HELP_TUTORIAL_MERGE
+    /**
+    *  @function ~CCSXHGenericContainer
+    *  @since S60 3.2
+    *  Destroy the object and release all memory objects
+    */
+    ~CCSXHGenericContainer();
+
+/** 
+*  @function HandleResourceChange
+*  @since S60 3.2
+*  Handles resource changes.
+*  This function is called by framework when when e.g skin or locale is changed.
+*  @param aType resource change type
+*/    	
+    	void HandleResourceChange(TInt aType);
+
+/** 
+*  @function HandleResourceChangeImpl
+*  @since S60 3.2
+*  Handles resource changes.
+*  Implementation function for resource change
+*  @param aType resource change type
+*/    	
+    	void HandleResourceChangeImpl(TInt aType);
+
+/** 
+*  @function SetDisplayTopicL
+*  @since S60 3.2
+*  Using Selected Item, set next object for display  
+*/    	
+    	void SetDisplayTopicL();
+
+/** 
+*  @function GetNumberOfListItems
+*  @since S60 3.2
+*  Get the number of items present in the List
+*  @return Number of Items in the List
+*/    	
+    	TInt GetNumberOfListItems();
+
+/** 
+*  @function SetCurrentView
+*  @since S60 3.2
+*  Sets View Pointer
+*  @param aView - Sets View pointer which is using this Container
+*/    	
+    	void SetCurrentView(CCSXHGenericView* aView);
+/** 
+*  @function CheckForMSK
+*  @since S60 3.2
+*  Checks Msk flag is Enabled or not, If Enabled, Sets MSK Label
+*/    	
+    	void CheckForMSK();	
+/** 
+*  @function HightLightItemL
+*  @since S60 3.2
+*  Sets the selected item in the list box
+*/
+		void HightLightItemL();		
+
+#ifdef FF_HELP_TUTORIAL_MERGE
+        /**
+        *  If the selected item is a tutorial item
+        *  @since S60 3.2
+        *  @param None
+        *  @return A boolean value to indicate the item is tutorial or not
+        *  Sets the selected item in the list box
+        */
+		TBool IsShowTutorialItemSelectedL();
+#endif // FF_HELP_TUTORIAL_MERGE
+		
+
+        void MakeVisible(TBool aVisible);
+
+    protected: // From base classes.
+/**
+ * When focus is changed, called.
+ * Set focus editor(viewer).
+ * @function FocusChanged
+ * @since 3.2
+ * @param aDrawNow used to determine whether or not
+ *        redraw should occur now, or later
+ */
+        void FocusChanged(TDrawNow aDrawNow);			
+    	
+	private:
+	
+/** 
+*  @function CCSXHGenericContainer
+*  @since S60 3.2
+*  Perform the second phase construction of a CCSXHDocument object
+*  @param aDocument - CCSXHDocument Object
+*/
+#ifdef FF_HELP_TUTORIAL_MERGE
+        CCSXHGenericContainer(CCSXHDocument &aDocument,CCSXHGenericView* aView);
+#else // !FF_HELP_TUTORIAL_MERGE
+        CCSXHGenericContainer(CCSXHDocument &aDocument);
+#endif // FF_HELP_TUTORIAL_MERGE
+/** 
+*  @function ConstructL
+*  @since S60 3.2
+*  Perform the first phase of two phase construction
+*  @param aRect - TRect Object
+*/
+    	void ConstructL(const TRect& aRect);    	
+
+/** 
+*  @function CreateAndPopulateListL
+*  @since S60 3.2
+*  Creates a AVKON List & Inserts items into it.
+*/
+		void CreateAndPopulateListL();	
+		
+		
+	private: 
+/** 
+*  From MEikListBoxObserver class
+*  @function HandleListBoxEventL
+*  @since S60 3.2
+*  This function handles List box Events
+*  @param aListBox 		- ListBox Pointer
+*		  aListBoxEvent - Event to be handled 	
+*/
+       	void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aListBoxEvent);	
+
+	private: // from CoeControl
+/** 
+*  From CoeControl class
+*  @function SizeChanged
+*  @since S60 3.2
+*  re-allocates and re-sizes components.
+*/
+       	void SizeChanged();
+/** 
+*  From CoeControl class
+*  @function CountComponentControls
+*  @since S60 3.2
+*  @return Number of child controls this has.  
+*/       	
+       	TInt CountComponentControls() const;
+
+/** 
+*  From CoeControl class
+*  @function ComponentControl
+*  @since S60 3.2
+* @param aIndex index of child controls
+* @retrun pointer to child control
+*/       	
+       	CCoeControl* ComponentControl(TInt aIndex) const;
+
+/** 
+*  From CoeControl class
+*  @function Draw
+*  @since S60 3.2
+*  Draw() for drawing the Background
+*/       	
+       	void Draw(const TRect& aRect) const;
+/** 
+*  From CoeControl class
+*  @function OfferKeyEventL
+*  @since S60 3.2
+*  Progress Key Event
+*  @param aKeyEvent the key event
+*  @param aType EEventKey | EEventKeyUp | EEventKeyDown
+*  @return EKeyWasConsumed if key event is processed,
+*         otherwise EKeyWasNotConsumed
+*/       	
+       	TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);	
+            	
+    private:	
+       	CCSXHDocument& iDocument;
+	   	CAknSingleStyleListBox* iListBox;
+       	CAknSearchField* iFindPane;
+       	CCSXHGenericView* iView;
+
+       	
+	};
+
+
+
+#endif /* INC_CSXHTOC2CONTAINER_H_HEADER_INCLUDED_BC039735 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/inc/CSXHGenericView.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,153 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHGenericView class declaration
+*
+*/
+
+
+#ifndef INC_CSXHGENERICVIEW_H_HEADER_INCLUDED_BC03B1F7
+#define INC_CSXHGENERICVIEW_H_HEADER_INCLUDED_BC03B1F7
+
+#include <aknview.h>
+#include <e32std.h> 
+
+//forward declarations
+class CCSXHGenericContainer;
+
+/** 
+* @class CCSXHGenericView
+* This class List View of the Csxhelp Application
+*/
+class CCSXHGenericView : public CAknView
+    {
+    public:
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHGenericContainer 
+*  and return a pointer to the created object
+*  @param aUid   - View Id
+*		  aFlags - Resource Id
+*		  aRect  - TRect Object	
+*  @return a CCSXHGenericView Pointer 
+*/      
+     	static CCSXHGenericView* NewL(const TUid& aUid, const TInt& aFlags);
+
+/** 
+*  @function ~CCSXHGenericView
+*  @since S60 3.2
+*  Destroy the object and release all memory objects
+*/
+	   	~CCSXHGenericView();
+
+/** 
+*  @function ResetContainer
+*  @since S60 3.2
+*  Reset the Flag, which helps to create a new Container 
+*/
+	   	void ResetContainer();
+
+/** 
+*  @function SetMiddleSoftKey
+*  @since S60 3.2
+*  This will set the Label for MSK
+*/
+    	void SetMiddleSoftKey(TBool aValue);
+    	
+    public:// Functions from base classes
+/**
+* From CAknView, return view id of this view
+*
+* @function Id
+* @since 3.2
+* @return view id
+*/    
+       	TUid Id() const;
+
+/** 
+ * @function HandleCommandL
+ * @since S60 3.2  
+ * takes care of command handling.
+ * @param aCommand command to be handled
+ */
+       	void HandleCommandL(TInt aCommand);	
+       	
+/** 
+ * @function ResourceChangeHdl
+ * @since S60 3.2  
+ * Handler for resource change
+ * @param aType - Type of resource change event
+ */
+     void ResourceChangeHdl(TInt aType);        	
+
+    	
+    protected: // Functions from base classes
+/**
+* From CAknView
+* @function DoActivateL 
+* activation handler
+*
+* @since 3.2
+* @param aPrevViewId ID of previious view.
+*/    
+       	void DoActivateL(const TVwsViewId& aPrevViewId,TUid,const TDesC8& );
+
+/**
+* From CAknView
+* @function DoDeactivate 
+* de-activation handler
+*
+* @since 3.2
+* @param aPrevViewId ID of previious view.
+*/    
+       	void DoDeactivate();
+/**
+* From MEikMenuObserver
+* @function DynInitMenuPaneL 
+* used to manage the menu when
+* no item are in the list box.
+* We need to delete the "Open"
+* menu item in this case.
+*
+* @since 3.2
+* @param aResource resource ID of menu pane
+* @param aMenuPane instance of menupane
+*/   
+    	void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
+    
+    private:
+/** 
+*  @function CCSXHGenericView
+*  @since S60 3.2
+*  Perform the first phase of two phase construction
+*/    
+       	CCSXHGenericView(const TUid&,const TInt&);
+
+/** 
+*  @function ConstructL
+*  @since S60 3.2
+*  Perform the second phase construction of a genericview object
+*/	 	
+       	void ConstructL(); 
+    
+    private:
+        CCSXHGenericContainer *iContainer;
+        TBool iResetContainerInActivate;
+        
+        TUid  iUid;
+        const TInt &iAppFlags;
+
+    };
+
+#endif /* INC_CSXHGENERICVIEW_H_HEADER_INCLUDED_BC03B1F7 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/inc/CSXHHtmlTopicContainer.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,507 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHHtmlTopicContainer class declaration
+*
+*/
+
+
+#ifndef INC_CCSXHHTMLTOPICCONTAINER_H__
+#define INC_CCSXHHTMLTOPICCONTAINER_H__
+//If I use INC_CCSXHHTMLTOPICCONTAINER_H__, then CodeScanner fails 
+//but if I use INC_CCSXH_HTML_TOPIC_CONTAINER_H__ code scanner 
+//reports an error but produces results for other files
+
+#include <coecntrl.h>
+#include <brctllinkresolver.h>
+#include <brctlinterface.h>
+//RUNTIME
+#include <featurecontrol.h>
+
+class CBrCtlInterface;
+class CCSXHDocument;
+class CCSXHHtmlTOC2;
+class CCSXHHtmlTopicView;
+class AppLauncherForCSXH;
+class CCSXHHelpContentBase;
+
+typedef CBrCtlInterface* (*FuncPtr_CreateBrowserControlL) (CCoeControl* aParent, TRect aRect,
+    TUint aBrCtlCapabilities, TUint aCommandIdBase = TBrCtlDefs::ECommandIdBase,
+    MBrCtlSoftkeysObserver* aBrCtlSoftkeysObserver = NULL,
+    MBrCtlLinkResolver* aBrCtlLinkResolver = NULL,
+    MBrCtlSpecialLoadObserver* aBrCtlSpecialLoadObserver = NULL,
+    MBrCtlLayoutObserver* aBrCtlLayoutObserver = NULL,
+    MBrCtlDialogsProvider* aBrCtlDialogsProvider = NULL,
+    MBrCtlWindowObserver* aBrCtlWindowObserver = NULL,
+	MBrCtlDownloadObserver* aBrCtlDownloadObserver = NULL );
+
+// A container which draw white rectagle.
+NONSHARABLE_CLASS( CBlankContainer ): public CCoeControl
+    {
+public:
+    CBlankContainer();
+    ~CBlankContainer();
+    
+    /** 
+    *  From CoeControl class
+    *  @function Draw
+    *  Draw() for drawing the Background
+    */
+    void Draw( const TRect& aRect ) const;
+    
+    };
+
+/** 
+* @class CCSXHHtmlTopicContainer
+* This class provides Browser functionality
+*/
+
+class CCSXHHtmlTopicContainer : public CCoeControl, public MBrCtlLinkResolver, 
+								public MBrCtlLinkContent, public MBrCtlLoadEventObserver,
+								public MBrCtlSoftkeysObserver,public MBrCtlLayoutObserver
+    {
+public:
+
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHHtmlTopicContainer 
+*  and return a pointer to the created object
+*  @param aRect - TRect Object
+*		  aDocument - Document Object 
+*		  aView		- HtmlTopicView Pointer
+*  @return a CCSXHHtmlTopicContainer Pointer 
+*/
+    static CCSXHHtmlTopicContainer* NewL(const TRect& aRect,CCSXHDocument 
+    &aDocument,CCSXHHtmlTopicView *aView);
+
+/** 
+*  @function NewLC
+*  @since S60 3.2
+*  Construct a CCSXHHtmlTopicContainer 
+*  and return a pointer to the created object using two phase constuction
+*  @param aRect - TRect Object
+*		  aDocument - Document Object 
+*		  aView		- HtmlTopicView Pointer
+*  @return a CCSXHHtmlTopicContainer Pointer 
+*/
+    static CCSXHHtmlTopicContainer* NewLC(const TRect& aRect,CCSXHDocument
+     &aDocument,CCSXHHtmlTopicView *aView);
+
+/** 
+*  @function CCSXHHtmlTopicContainer
+*  @since S60 3.2
+*  Construct a CCSXHHtmlTopicContainer 
+*  and return a pointer to the created object using two phase constuction
+*  @param aRect - TRect Object
+*		  aDocument - Document Object 
+*		  aView		- HtmlTopicView Pointer
+*  @return a CCSXHHtmlTopicContainer Pointer 
+*/
+	CCSXHHtmlTopicContainer(CCSXHDocument &aDocument, CCSXHHtmlTopicView *aView);
+/** 
+ * @function ~CCSXHHtmlTopicContainer
+ * @since S60 3.2
+ * Destroy the object and release all memory objects
+ */
+  ~CCSXHHtmlTopicContainer();
+  
+/** 
+ * @function SetAndLoadInitialTopicL
+ * @since S60 3.2
+ * Destroy the object and release all memory objects
+ * @param aTopic - Initial Topic to be displayed 
+ */  
+ void SetAndLoadInitialTopicL(CCSXHHtmlTOC2* aTopic);
+     
+public:  
+/**
+* From MBrCtlSoftkeysObserver class
+*  Browser plug-in calls this method requests to update a softkey 
+*  @function UpdateSoftkeyL    
+*  @since S60 3.2
+*  @Param aKeySoftkey	- Update the left softkey or the right softkey  
+*		 aLabel			- The label associated with the softkey update  
+*		 aCommandId		- The command to use if the softkey is selected by the user  
+*		 aBrCtlSoftkeyChangeReason - The reason for the softkey change  
+*/
+void UpdateSoftkeyL(TBrCtlKeySoftkey aKeySoftkey,
+                                    const TDesC& aLabel,
+                                    TUint32 aCommandId,
+                                    TBrCtlSoftkeyChangeReason aBrCtlSoftkeyChangeReason);
+
+/**
+* From MBrCtlLayoutObserver Class
+*  Browser plug-in calls this method to Update the position of vertical scrollbar
+*  @function UpdateBrowserVScrollBarL
+*  @since S60 3.2    
+*  @Param  aDocumentHeight - The total height of the markup page  
+* 		   aDisplayHeight  - The height of the display  
+* 		   aDisplayPosY    - The current Y position  
+*/                                    
+ void UpdateBrowserVScrollBarL(TInt aDocumentHeight, 
+                                              TInt aDisplayHeight,
+                                              TInt aDisplayPosY ) ;
+                                              
+/**
+* From MBrCtlLayoutObserver Class
+*  Browser plug-in calls this method to Update the position of horizontal scrollbar
+*  @function UpdateBrowserHScrollBarL
+*  @since S60 3.2    
+*  @Param  aDocumentWidth - The total width of the markup page  
+* 		   aDisplayWidth  - The width of the display  
+* 		   aDisplayPosX    - The current X position  
+*/                                              
+void UpdateBrowserHScrollBarL(TInt aDocumentWidth, 
+                                              TInt aDisplayWidth,
+                                              TInt aDisplayPosX );
+                                              
+/**
+* From MBrCtlLayoutObserver Class
+*  Browser plug-in calls this method to Inform the layout of the page: right to left or left to right
+*  @function NotifyLayoutChange    
+*  @since S60 3.2
+*  @Param  aNewLayout - RTL or LTR 
+*/                                              
+void NotifyLayoutChange( TBrCtlLayout aNewLayout );
+  
+/**
+* From MBrCtlLayoutObserver Class
+*  Browser plug-in calls this method to Inform the layout of the page: right to left or left to right
+*  @function UpdateTitleL
+*  @since S60 3.2    
+*  @Param  aTitle - Title of the page 
+*/        
+void UpdateTitleL( const TDesC& aTitle );                                   
+
+public:  // from CCoeControl
+/** 
+*  From CoeControl class
+*  @function SizeChanged
+*  @since S60 3.2
+*  re-allocates and re-sizes components.
+*/
+	void SizeChanged();
+/** 
+*  From CoeControl class
+*  @function CountComponentControls
+*  @since S60 3.2
+*  @return Number of child controls this has.  
+*/	
+	TInt CountComponentControls() const;
+
+/** 
+*  From CoeControl class
+*  @function ComponentControl
+*  @since S60 3.2
+* @param aIndex index of child controls
+* @retrun pointer to child control
+*/	
+	CCoeControl* ComponentControl(TInt aIndex) const;
+/** 
+*  From CoeControl class
+*  @function OfferKeyEventL
+*  @since S60 3.2
+*  Progress Key Event
+*  @param aKeyEvent the key event
+*  @param aType EEventKey | EEventKeyUp | EEventKeyDown
+*  @return EKeyWasConsumed if key event is processed,
+*         otherwise EKeyWasNotConsumed
+*/
+	TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
+
+/** 
+*  From MBrCtlLoadEventObserver class
+*  @function HandleBrowserLoadEventL
+*  @since S60 3.2
+*  A load events notification
+*  @param aLoadEvent - The load event  
+*  		  aSize  	 - Size depends on the event  
+*  		  aTransactionId  - The transaction id of the transaction that had this event  
+*/	
+	void HandleBrowserLoadEventL(TBrCtlDefs::TBrCtlLoadEvent aLoadEvent, 
+								TUint aSize, TUint16 aTransactionId);
+
+/** 
+*  @function RefreshL
+*  @since S60 3.2
+*  Used to Refresh the Content
+*  @param aTopic - CCSXHHtmlTOC2 Object  
+*/	
+	void RefreshL(CCSXHHtmlTOC2 *aTopic);
+	
+/** 
+*  @function HandleBackKeyL
+*  Handle Back Key
+*  @since S60 3.2
+*  @return ETrue, if the key is handled in the container, EFalse otherwise 
+*/ 
+	TBool HandleBackKeyL();
+
+/** 
+*  @function IsPrevHtmlPageAvblL
+*  Check for Existance of the page in the Browser history stack
+*  @since S60 3.2
+*  @return ETrue, if page is available in Browser History Stack, EFalse otherwise 
+*/ 
+	TBool IsPrevHtmlPageAvblL();
+
+/** 
+*  @function SetSelectedFontSizeL
+*  Sets BrowserFontsize
+*  @since S60 3.2
+*  @param aValue - Fontsize Value
+*/	
+	void SetSelectedFontSizeL(TInt aValue);
+	
+/** 
+*  @function SetSelectedFontSizeL
+*  Get Current Settings Value
+*  @since S60 3.2
+*  @param aValue - Any Setting 
+*  @return Current Value used by Browser
+*/	
+	TInt GetCurrentValueL(TInt aSetting);
+
+/** 
+*  @function HandleCommandBackL
+*  @since S60 3.2
+*  Handles resource changes.
+*  pass OpenLink command to the browser HandlecommandL 
+*/
+	void HandleCommandOpenHyperLinkL();
+
+/** 
+*  From CoeControl class
+*  @function Draw
+*  @since S60 3.2
+*  Draw() for drawing the Background
+*/
+    void Draw(const TRect& aRect) const;
+  
+  	void ShowIndexHtmlPageL() const;
+/** 
+*  @function HandleResourceChange
+*  @since S60 3.2
+*  Handles resource changes.
+*  This function is called by framework when when e.g skin or locale is changed.
+*  @param aType resource change type
+*/    	
+   	void HandleResourceChange(TInt aType);
+
+/** 
+*  @function HandleResourceChangeImpl
+*  @since S60 3.2
+*  Handles resource changes.
+*  Implementation function for resource change
+*  @param aType resource change type
+*/    	
+    	void HandleResourceChangeImpl(TInt aType);
+
+/** 
+*  @function HandleCommandBackL
+*  @since S60 3.2
+*  Handles resource changes.
+*  pass Back command to the browser HandlecommandL 
+*/   	
+	void HandleCommandBackL();
+	
+/**
+* Browser plug-in calls this method when embedded link is found. Used with ECapabilityClientResolveEmbeddedURL
+* @since 3.2
+* @param aEmbeddedUrl The url of the embedded content
+* @param aCurrentUrl The url of the current page
+* @param aLoadContentType The expected type of the embedded content
+* @param aEmbeddedLinkContent a callback interface to return the embedded content
+* @return EFalse, browser will resolve the link
+*/
+    TBool ResolveEmbeddedLinkL(const TDesC& aEmbeddedUrl,
+    		                               const TDesC& aCurrentUrl,
+        	                               TBrCtlLoadContentType aLoadContentType, 
+        	                               MBrCtlLinkContent& aEmbeddedLinkContent); 
+		
+/**
+* Browser plug-in calls this method when the user requests to load content via selecting a link, or any other way. Used with ECapabilityClientNotifyURL 
+* @since 3.2
+* @param aUrl The requested url
+* @param aCurrentUrl The url of the current page
+* @param aBrCtlLinkContent a callback interface to return the embedded content
+* @return EFalse, browser will resolve the link
+*/
+        TBool ResolveLinkL(const TDesC& aUrl, const TDesC& aCurrentUrl,
+                                   MBrCtlLinkContent& aBrCtlLinkContent);
+
+/**
+* @function CancelFetchL
+* Cancel all outstanding resolving operations
+*/
+        void CancelFetchL();
+/**
+* @function CancelAll
+* Cancel all outstanding resolving operations
+* @since 3.2
+*/
+        void CancelAll();
+        
+        
+/**
+* @function HandleResolveComplete
+* @since 3.2	
+* Resolver calls this method when content is resolved.
+* @param aContentType The content type of the response
+* @param aCharset The charset of the response. May be empty in case of image
+* @param aContentBuf content data. Ownership is not transfered
+* @return void
+*/
+        void HandleResolveComplete(const TDesC& aContentType,
+                                           const TDesC& aCharset,
+                                           const HBufC8* aContentBuf);
+
+/**
+* @function HandleResolveError
+* @since 3.2
+* This method is called if there is some error while resolving the content
+* @param aError system wide error code.
+*/
+        void HandleResolveError(TInt aError);
+/** 
+*  @function CheckForMSK
+*  @since S60 3.2
+*  Checks Msk flag is Enabled or not, If Enabled, Sets MSK Label
+*/      
+		void CheckForMSK();
+/** 
+*  @function IsPrevPageAvbl
+*  Check wether focus is on Hyperlink or not
+*  @since S60 3.2
+*  @return ETrue, if Focus is on Hyperlink , EFalse otherwise 
+*/		
+		TBool IsHyperLinkFocused();	
+/** 
+*  @function IsPrevPageAvbl
+*  Check for Existance of the page
+*  @since S60 3.2
+*  @return ETrue, if page is available , EFalse otherwise 
+*/		
+	 	TBool IsPrevPageAvbl();
+	 	
+/** 
+*  @function ClearHistoryL
+*  Clear Browser history stack
+*  @since S60 3.2
+*/	 	
+ 		void  ClearHistoryL(); 
+ 		
+/** 
+*  @function GetCurrActiveObject
+*  Get the Current Active Object 
+*  @since S60 3.2
+*  @return CCSXHHelpContentBase Pointer, 
+*/ 		
+ 		CCSXHHelpContentBase* GetCurrActiveObject();
+
+private:
+ 		
+/**
+* The state type of browser content.
+* @see SetContentLoadState() and NeedRefresh.
+*/
+    enum TContentLoadState
+        {
+        ENoContent,
+        EContentLoading,
+        EContentLoadFinished
+        };
+
+/**
+*  @function ConstructL
+*  @since S60 3.2
+*  @Perform the second phase construction of a HtmlTopicContainer object
+*  @param aRect the rectangle this view will be drawn to
+ */
+    void ConstructL( const TRect& aRect );
+
+/** 
+*  @function LoadHtmlL
+*  loads HTML page in the Browser
+*  @since S60 3.2
+*/
+	void LoadHtmlL();
+
+/** 
+*  @function CheckForExternalLinkL
+*  Check for external Hyperlink, if yes launch browserNG
+*  @since S60 3.2
+*  @return ETrue, if external hyperlink available, EFalse otherwise 
+*/	
+	TBool CheckForExternalLinkL(const TDesC& aUrl);
+	
+/**
+* @function SetContentLoadingState
+* Set the state of content loading and refresh the UI id needed
+*/
+    void SetContentLoadState( const TContentLoadState aLoadState );
+        
+/**
+* @function NeedRefresh
+* Judge whether we need to refresh the browser control
+*/
+    TBool NeedRefresh( const TContentLoadState aNewLoadState ) const;
+    
+/**
+ * @function HideBrowser
+ */    
+    void HideBrowser();
+    
+/**
+ * * @function ShowBrowser
+ */
+    void ShowBrowser();
+    
+/*
+ *  @function SetTopAndBottomContainer
+ *  To set top and Bottom container of browser and blank container
+ */
+    void SetTopAndBottomContainer( CCoeControl* aTopControl, 
+            CCoeControl* aBottomControl );
+
+private:
+	CBrCtlInterface* iBrCtrl;    
+	CCSXHHtmlTOC2* iTopic;
+	CCSXHDocument& iDocument;
+    CCSXHHelpContentBase *iNewTopic;
+    
+    //Check the impln comments in HandleBrowserLoadEventL function
+    TBuf<KMaxFileName> iUrlNoAnchors; 
+    
+    CCSXHHtmlTopicView* iView;    
+    AppLauncherForCSXH* iAppLauncher;
+    RLibrary iBrLibrary;
+    RFeatureControl iFeatureControl;
+    TBool iLoadHtml;    
+    TInt32 iPrevPageCount;
+    TBool iBack;
+    
+    TContentLoadState iContentLoading;
+    
+    // used to hide browser control if needed.
+    CCoeControl*    iBlankContainer;
+    
+    // Used to determine whether hide browser control or not.
+    CCoeControl*    iTopControl;
+    CCoeControl*    iBottomControl;
+    
+	};
+
+
+#endif 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/inc/CSXHHtmlTopicView.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,217 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHHtmlTopicView class declaration
+*
+*/
+
+
+#ifndef INC_CCSXHHTMLTOPICVIEW_H__
+#define INC_CCSXHHTMLTOPICVIEW_H__
+
+// INCLUDES
+#include <aknview.h>
+#include <aknlists.h>
+
+class CCSXHHtmlTopicContainer;
+class TCoeHelpContext;
+// CLASS DECLARATION
+
+/** 
+* @class CCSXHHtmlTopicView
+* This class handles BrowserView of the Csxhelp Application
+*/
+class CCSXHHtmlTopicView : public CAknView
+    {
+    public: 
+    
+    enum THtmlViewType
+    	{
+    	EHtmlView = 0,
+    	EContextHtmlView
+    	};    
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHHtmlTopicView 
+*  and return a pointer to the created object
+*  @param aUid   - View Id
+*		  aFlags - Resource Id
+*		  aRect  - TRect Object	
+*  @return a CCSXHHtmlTopicView Pointer 
+*/
+    static CCSXHHtmlTopicView* NewL(const TUid&, const TInt&,const TRect& aRect);
+    
+/** 
+*  @function ~CCSXHHtmlTopicView
+*  @since S60 3.2
+*  Destroy the object and release all memory objects
+*/
+    virtual ~CCSXHHtmlTopicView();
+
+/**
+*  @function SetViewType
+*  @since S60 3.2
+*  Sets the view type as either normal or context view
+*/        
+	void SetViewTypeL(TInt viewType); 
+	
+/** 
+*  @function GetViewType
+*  @since S60 3.2
+*  Gets the view type as either normal or context view
+*/        
+	TInt GetViewType(); 	
+        
+    protected:
+/** 
+*  @function CCSXHHtmlTopicView
+*  @since S60 3.2
+*  Perform the first phase of two phase construction
+*/  
+    CCSXHHtmlTopicView(const TUid&,const TInt&);
+
+/** 
+*  @function ConstructL
+*  @since S60 3.2
+*  Perform the second phase construction of a htmltopicview object
+*/  
+    void ConstructL(const TRect& aRect);
+
+/**
+* From MEikMenuObserver
+* @function DynInitMenuPaneL 
+* used to manage the menu when
+* no item are in the list box.
+* We need to delete the "Open"
+* menu item in this case.
+*
+* @since 3.2
+* @param aResource resource ID of menu pane
+* @param aMenuPane instance of menupane
+*/         
+        void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
+      
+
+    public: // Functions from base classes
+/**
+* From CAknView, return view id of this view
+*
+* @function Id
+* @since 3.2
+* @return view id
+*/
+       TUid Id() const;
+
+/** 
+ * @function HandleCommandL
+ * @since S60 3.2  
+ * takes care of command handling.
+ * @param aCommand command to be handled
+ */
+       void HandleCommandL(TInt aCommand);
+       
+/** 
+ * @function ResourceChangeHdl
+ * @since S60 3.2  
+ * Handler for resource change
+ * @param aType - Type of resource change event
+ */
+     void ResourceChangeHdl(TInt aType);             
+
+/** 
+ * @function ViewActivatedL
+ * @since S60 3.2  
+ * Takes any action required when this view is activated. 
+ * Handles this view activation event from view server
+ * @param aPrevViewId  		- Specifies the view previously active.  
+ *		  aCustomMessageId  - Specifies the message type.  
+ *  	  aCustomMessage    - Activation message 
+ */
+       void ViewActivatedL(const TVwsViewId& aPrevViewId,
+	                             TUid aCustomMessageId,
+	                             const TDesC8& aCustomMessage);
+	                             
+	                             
+/** 
+ * @function SetSoftKeysL
+ * @since S60 3.2  
+ * Sets SoftKeys 
+ * @param aSoftKeys Resource Id
+ */	                             
+	   void SetSoftKeysL(TInt aSoftKeys);
+	   
+/** 
+ * @function GetCurrentFontSize
+ * @since S60 3.2  
+ * SetSoftKeysL 
+ * @return Current FontSize 
+ */	   
+	   TInt GetCurrentFontSize();
+/** 
+*  @function SetMiddleSoftKey
+*  @since S60 3.2
+*  This will set the Label for MSK
+*/	   
+	   void SetMiddleSoftKey(TBool aValue);
+	   
+/**
+* From CAknView
+* @function DoDeactivate 
+* de-activation handler
+*
+* @since 3.2
+* @param aPrevViewId ID of previious view.
+*/  
+      void DoDeactivate();	   
+#ifdef FF_HELP_TUTORIAL_MERGE
+    /**
+    *  Lauch tutorial if exist, else popup a error message
+    *  @since S60 3.2
+    *  @param None
+    *  @return None
+    */
+    void LaunchTutorialL();
+#endif // FF_HELP_TUTORIAL_MERGE
+
+    protected: // functions from base classes
+/**
+* From CAknView
+* @function DoActivateL 
+* activation handler
+*
+* @since 3.2
+* @param aPrevViewId ID of previious view.
+*/
+       void DoActivateL(const TVwsViewId& aPrevViewId,
+                             TUid /* aCustomMessageId */,
+                             const TDesC8& /* aCustomMessage */);
+
+
+        
+   private: 
+        // previous view
+      TVwsViewId iPrevious;
+	  CCSXHHtmlTopicContainer* iBCContainer;
+	  
+	  const TUid& iUid;
+      const TInt& iAppFlags;
+      
+	  static TInt iFontSize;
+	  
+	  TBool iContextTopicView;		
+    };
+
+#endif // INC_CCSXHHTMLTOPICVIEW_H__
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/inc/CSXHLegacyTopicContainer.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,227 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHLegacyTopicContainer class declaration
+*
+*/
+
+
+// INCLUDES
+#include <aknview.h>
+#include <eikedwob.h>
+#include <txtfrmat.h>
+
+
+// FORWARD DECLARATIONS
+class CEikRichTextEditor;
+class CEikGlobalTextEditor;
+class CRichText;
+class CAknsBasicBackgroundControlContext;
+class CCSXHDocument;
+class CCSXHLegacyTOC2;
+// CLASS DECLARATION
+
+/**
+*  CCsHelpTopicContainer
+*  container control class for legacy topic view
+*  @lib etext.lib, eikcoctl.lib
+*  @since 3.2
+*/
+class CCSXHLegacyTopicContainer : public CCoeControl
+    {
+    public: // Constructors and destructor
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHLegacyTopicContainer 
+*  and return a pointer to the created object
+*  @param aRect - TRect Object
+*		  aDocument - Document Object 
+*		  aTopic	- LegacyTOC2 Pointer	
+*  @return a CCSXHLegacyTopicContainer Pointer 
+*/
+        static CCSXHLegacyTopicContainer* NewL(const TRect& aRect,CCSXHDocument
+        &aDocument,CCSXHLegacyTOC2 *aTopic);
+        
+/** 
+*  @function NewLC
+*  @since S60 3.2
+*  Construct a CCSXHLegacyTopicContainer 
+*  and return a pointer to the created object using two phase constuction
+*  @param aRect - TRect Object
+*		  aDocument - Document Object 
+*		  aTopic	- LegacyTOC2 Pointer	
+*  @return a CCSXHLegacyTopicContainer Pointer 
+*/        
+		static CCSXHLegacyTopicContainer* NewLC(const TRect& aRect,CCSXHDocument
+		&aDocument,CCSXHLegacyTOC2 *aTopic);
+		
+/** 
+*  @function CCSXHLegacyTopicContainer
+*  @since S60 3.2
+*  Construct a CCSXHLegacyTopicContainer 
+*  and return a pointer to the created object using two phase constuction
+*  @param aDocument - Document Object 
+*		  aTopic	- LegacyTOC2 Pointer	
+*  @return a CCSXHHtmlTopicContainer Pointer 
+*/		
+		CCSXHLegacyTopicContainer(CCSXHDocument &aDocument,CCSXHLegacyTOC2 *aTopic);
+
+/** 
+*  @function RefreshL
+*  @since S60 3.2
+*  Used to Refresh the Content
+*  @param aTopic - CCSXHLegacyTOC2 Object  
+*/
+		void RefreshL(CCSXHLegacyTOC2 *aTopic);
+			
+ /**
+  @function ConstructL
+  @since S60 3.2
+  Perform the second phase construction of a LegacyTopicContainer object
+  @param aRect the rectangle this view will be drawn to
+  */      void ConstructL(const TRect& aRect);
+        
+        /**
+        * @The Mopsupply object gives the skin context to 
+        * @the scrollbar, so that the scrollbar is skinned
+        * @according the skin parameters and look transparent
+          */
+        TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
+
+/** 
+ * @function ~CCSXHLegacyTopicContainer
+ * @since S60 3.2
+ * Destroy the object and release all memory objects
+ */
+      virtual ~CCSXHLegacyTopicContainer();		
+		
+    public: // New functions
+/** 
+*  @function HandleResourceChange
+*  @since S60 3.2
+*  Handles resource changes.
+*  This function is called by framework when when e.g skin or locale is changed.
+*  @param aType resource change type
+*/ 
+        void HandleResourceChange(TInt aType);
+
+/** 
+*  @function HandleResourceChangeImpl
+*  @since S60 3.2
+*  Handles resource changes.
+*  Implementation function for resource change
+*  @param aType resource change type
+*/    	
+    	void HandleResourceChangeImpl(TInt aType);
+        
+	
+    protected: // New functions
+/** 
+*  @function SetTextL
+*  @since S60 3.2
+*  Handles resource changes.
+*  set topic's text to a rich text editor
+*  @param aText help document
+*/         
+        void SetTextL(CRichText* aText);
+
+    protected: // From base classes.
+/**
+ * When focus is changed, called.
+ * Set focus editor(viewer).
+ * @function FocusChanged
+ * @since 3.2
+ * @param aDrawNow used to determine whether or not
+ *        redraw should occur now, or later
+ */
+        void FocusChanged(TDrawNow aDrawNow);
+
+
+    private: // new function
+/**
+ * Get rich text format from resource.
+ * @function GetTextFormat
+ * @since 3.2
+ */
+        void GetTextFormat();
+
+/*
+* Format the rich text help data
+* @function FormatRichTextL
+* @since 3.2
+* @param aText instance of the CRichText object to format
+*/
+        void FormatRichTextL(CRichText& aText);
+
+    private: // Functions from base classes
+/** 
+*  From CoeControl class
+*  @function SizeChanged
+*  @since S60 3.2
+*  re-allocates and re-sizes components.
+*/
+       void SizeChanged();
+
+/** 
+*  From CoeControl class
+*  @function OfferKeyEventL
+*  @since S60 3.2
+*  Progress Key Event
+*  @param aKeyEvent the key event
+*  @param aType EEventKey | EEventKeyUp | EEventKeyDown
+*  @return EKeyWasConsumed if key event is processed,
+*         otherwise EKeyWasNotConsumed
+*/
+        TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
+                                    TEventCode aType);
+
+/** 
+*  From CoeControl class
+*  @function CountComponentControls
+*  @since S60 3.2
+*  @return Number of child controls this has.  
+*/       
+		TInt CountComponentControls() const;
+
+/** 
+*  From CoeControl class
+*  @function ComponentControl
+*  @since S60 3.2
+* @param aIndex index of child controls
+* @retrun pointer to child control
+*/
+        CCoeControl* ComponentControl(TInt aIndex) const;
+
+/** 
+*  From CoeControl class
+*  @function Draw
+*  @since S60 3.2
+*  Draw() for drawing the Background
+*/
+        void Draw(const TRect& aRect) const;
+        
+
+    private: //data
+        // to show help document
+        CEikEdwin* iEdwin;
+		
+        // rich text format
+        TCharFormat iCharFormat;
+        TCharFormatMask iCharFormatMask;
+		CAknsBasicBackgroundControlContext* iSkinContext; // skin data
+		CRichText* iText; // skin data	
+		CCSXHDocument& iDocument;	
+		CCSXHLegacyTOC2* iTopic;
+    };
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/inc/CSXHLegacyTopicView.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,147 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHLegacyTopicView class declaration
+*
+*/
+
+
+#include <aknview.h>
+#include <aknlists.h>
+
+class CCSXHLegacyTopicContainer;
+
+// CLASS DECLARATION
+
+/** 
+* @class CCSXHLegacyTopicView
+* This class handles RichTextView of the Csxhelp Application
+*/
+class CCSXHLegacyTopicView : public CAknView
+    {
+    public:   
+/** 
+*  @function NewL
+*  @since S60 3.2
+*  Construct a CCSXHLegacyTopicView 
+*  and return a pointer to the created object
+*  @param aUid   - View Id
+*		  aFlags - Resource Id
+*		  aRect  - TRect Object	
+*  @return a CCSXHLegacyTopicView Pointer 
+*/
+     
+    static CCSXHLegacyTopicView* NewL(const TUid& aUid, const TInt& 
+			aFlags,const TRect& aRect);
+/**
+* From CAknView
+* @function DoDeactivate 
+* de-activation handler
+*
+* @since 3.2
+* @param aPrevViewId ID of previious view.
+*/    
+    void DoDeactivate();
+    
+/** 
+*  @function ~CCSXHLegacyTopicView
+*  @since S60 3.2
+*  Destroy the object and release all memory objects
+*/
+        virtual ~CCSXHLegacyTopicView();
+    protected:
+/** 
+*  @function CCSXHLegacyTopicView
+*  @since S60 3.2
+*  Perform the first phase of two phase construction
+*/        CCSXHLegacyTopicView(const TUid&, const TInt&);
+
+/** 
+*  @function ConstructL
+*  @since S60 3.2
+*  Perform the second phase construction of a legacytopicview object
+*  @param aRect the rectangle this view will be drawn to
+*/ 
+       void ConstructL(const TRect& aRect);          
+
+    public: // Functions from base classes
+ /**
+* From CAknView, return view id of this view
+*
+* @function Id
+* @since 3.2
+* @return view id
+*/
+        TUid Id() const;
+
+/** 
+ * @function HandleCommandL
+ * @since S60 3.2  
+ * takes care of command handling.
+ * @param aCommand command to be handled
+ */
+        void HandleCommandL(TInt aCommand);  
+        
+/** 
+ * @function ResourceChangeHdl
+ * @since S60 3.2  
+ * Handler for resource change
+ * @param aType - Type of resource change event
+ */
+     void ResourceChangeHdl(TInt aType);                 
+
+    protected: // functions from base classes
+/**
+* From CAknView
+* @function DoActivateL 
+* activation handler
+*
+* @since 3.2
+* @param aPrevViewId ID of previious view.
+*/ 
+        void DoActivateL(const TVwsViewId& aPrevViewId,
+                             TUid /* aCustomMessageId */,
+                             const TDesC8& /* aCustomMessage */);
+                             
+
+/** 
+ * @function ViewActivatedL
+ * @since S60 3.2  
+ * Takes any action required when this view is activated. 
+ * Handles this view activation event from view server
+ * @param aPrevViewId  		- Specifies the view previously active.  
+ *		  aCustomMessageId  - Specifies the message type.  
+ *  	  aCustomMessage    - Activation message 
+ */                             
+       void ViewActivatedL(const TVwsViewId& aPrevViewId,
+	                             TUid aCustomMessageId,
+	                             const TDesC8& aCustomMessage);
+	                             
+/** 
+ * @function ViewActivatedL
+ * @since S60 3.2  
+ * Takes any action required when this view is deactivated. 
+ * Handles this view deactivation event from view server 
+ */
+	   void ViewDeactivated();
+
+
+    private: 
+         
+		CCSXHLegacyTopicContainer* iTopicContainer;
+		TVwsViewId iPrevious;
+		
+		const TUid& iUid;
+      	const TInt& iAppFlags;
+  
+    };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/inc/CsHelp.hrh	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,90 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Declarations for resources of cshelp.
+*
+*/
+
+
+#ifndef CSHELP_HRH
+#define CSHELP_HRH
+
+enum TCSXHIds
+    {
+    ECSXHOpenItem = 1,  // start value must not be 0
+    ECSXHOpenItemPropagated , //Propagated from container
+    ECSXHTOC1ListView,
+    ECSXHKywdTOC1ListView,
+    ECSXHTOC2ListView,
+    ECSXHSearchText,
+    ECSXHOpenTopicView,
+    ECSXHOpenTopicText,
+    ECSXHOpenApplicationTopics,
+    ECsHelpCmdFontLarge,    
+    ECsHelpCmdFontSmall,
+    ECSXHOpenHyperLink,
+    ECSXHDummyMSK,
+    ECmdAiwPlaceHolder,
+    ECmdLast
+    };
+
+
+
+// Commands
+enum TCsHelpMenuCommands
+    {
+    ECsHelpCmdViewCategoryList = 0x6000,
+    ECsHelpCmdViewTopicList,
+    ECsHelpCmdViewTopic,
+    ECsHelpCmdViewTopicForContext,
+    ECsHelpCmdViewTopicForSearch,
+    ECsHelpCmdViewSearch,
+    ECsHelpCmdViewSearchResult,
+
+    ECsHelpCmdNextTopicList,
+    ECsHelpCmdPreviousTopicList,
+
+    ECsHelpCmdNextTopic,
+    ECsHelpCmdPreviousTopic,
+
+    ECsHelpCmdNextIndex,
+    ECsHelpCmdPreviousIndex
+    };
+
+// Tab ID for category list view and search view
+enum TCsHelpTabId
+    {
+    ECsHelpCategoryTab,
+    ECsHelpSearchTab
+    };
+
+ 
+// note id
+enum TCsHelpNoteId
+    {
+    EProgressNote = 1,
+    EInstallNote
+    };
+
+
+enum TTutorialAiwCommands {
+        KLaunchTutorial = 0x10208a86,  //Launches tutorial as embedded application
+        KPlayPresentation,         //Plays tutorial presentation
+        KPresentationExists,       //Tests if the given presentation exists
+        KPlayDefaultPresentation,  //Plays tutorial default presentation 
+        KDefaultPresentationExists //Tests if the default presentation exists
+    };
+
+#endif      //  CSHELP_HRH
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/inc/cshelp.laf	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,41 @@
+/*
+* ============================================================================
+*  Name     : cshelp.laf
+*  Part of  : CsHelp
+*
+*  Description:
+*     This is the LAF specification file for the Cshelp app.
+*       
+*
+*  Version:
+*
+*  Copyright (C) 2002 Nokia Corporation.
+*  This material, including documentation and any related
+*  computer programs, is protected by copyright controlled by
+*  Nokia Corporation. All rights are reserved. Copying,
+*  including reproducing, storing,  adapting or translating, any 
+*  or all of this material requires the prior written consent of 
+*  Nokia Corporation. This material also contains confidential 
+*  information which may not be disclosed to others without the 
+*  prior written consent of Nokia Corporation.
+*
+* ============================================================================
+*/
+
+//d: laf data for Help application's topic view.
+// Edit 16 >>
+////l: main_pane_1
+//l:main_pane_1_help_item_text
+// <<
+//
+#define topic_view_font     ELatinPlain12
+#define topic_view_C        215 
+#define topic_view_l        4
+#define topic_view_r        5
+#define topic_view_B        21
+#define topic_view_W        167
+#define topic_view_J        ELayoutAlignBidi
+#define topic_view_lines    8
+#define topic_view_nextB    37
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/inc/csxhruntimeappwatcher.h	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,107 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  observer if any install/unistall happens at help app
+*                 runtime
+*
+*/
+
+#ifndef CSXHRUNTIMEAPPWATCHER_H
+#define CSXHRUNTIMEAPPWATCHER_H
+
+#include <e32base.h>
+#include <f32file.h>
+
+/*
+ * Base class of Installation/Uninstallation
+ * 
+ */
+class MInstallationObserver
+    {
+public:
+    /*
+     * call back function, to handle update index
+     */
+    virtual void RuntimeUpdateIndex() = 0;
+    };
+
+/*
+ * Runtime indexing wather
+ * keep watching if user install/uninstall/modify any helps
+ * 
+ */
+class CCSXHRuntimeAppWatcher : public CActive
+    {
+public:
+    
+    /*
+     * default constructor
+     */
+    CCSXHRuntimeAppWatcher();
+    
+    /*
+     * destructor
+     */
+    ~CCSXHRuntimeAppWatcher();
+    
+    /*
+     * two-phase constructor
+     */
+    static CCSXHRuntimeAppWatcher* NewL();
+    
+    /*
+     * from base class CActive
+     * Handles an active object's request completion event
+     */
+    void RunL();
+    
+    /*
+     * from base class CActive
+     * Implements cancellation of an outstanding request
+     */
+    void DoCancel();
+    
+    /*
+     * start this active object
+     */
+    void Start();
+    
+    /*
+     * Set observer
+     * @param aObserver: App UI, notify user helps modified
+     * 
+     */
+    void SetObserver( MInstallationObserver* aObserver );
+    
+private:
+    
+    /*
+     * two-phase constructor
+     */
+    void ConstructL();
+    
+private:
+
+    /*
+     * file session
+     */
+    RFs iFileSession;
+    
+    /*
+     * observer
+     * not owned
+     */
+    MInstallationObserver* iObserver;
+    };
+    
+#endif // CSXHRUNTIMEAPPWATCHER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/loc/csxhelp.loc	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,141 @@
+/*
+* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Localisation file for Csxhelp
+*
+*/
+
+
+//  LOCALISATION STRINGS
+//d: help application name in selection grid window
+//l: cell_app_pane_t1
+#define qtn_apps_grid_help          "Help"
+
+//d: help application name in selection list window
+//l: list_single_large_graphic_pane_t1
+#define qtn_apps_ls1_help           "Help"
+
+//d: text when there is no topic
+//l: popup_note_window
+#define qtn_help_note_no_topic      "No topic available"
+
+//d: text of wait note while sarching 
+//l: popup_note_wait_window
+#define qtn_help_noteg_searching    "Searching"
+
+//d: Command in options menu. go to categor list view
+//l: list_single_pane_t1_cp2
+#define qtn_help_om_category_list   "Help category list"
+
+//d: Command in options menu. find keywords, and go to search result view
+//l: list_single_pane_t1_cp2
+#define qtn_help_om_find_topics     "Find"
+
+
+//d: Command in options menu. go to topic list view
+//l: list_single_pane_t1_cp2
+#define qtn_help_om_open_category   "Open"
+
+//d: Command in options menu. go to topic view
+//l: list_single_pane_t1_cp2
+#define qtn_help_om_open_topic      "Open"
+
+//d: Command in options menu. go to search view.
+//l: list_single_pane_t1_cp2
+#define qtn_help_om_search          "Search by keyword"
+
+
+//d: Command in options menu. go to topic list view
+//l: list_single_pane_t1_cp2
+#define qtn_help_om_topic_list      "Topic list"
+
+//d: title text in help application
+//l: title_pane_t2/opt9
+#define qtn_help_title_help         "Help"
+
+//d: when help application is launched from options menu and no help topic is 
+//d: associated with present view, information note with this text is dsplayed.
+//l: popup_note_window
+#define qtn_help_note_no_topics "No help topics available"
+
+//d: Command in options menu. go to search view
+//l: list_single_pane_t1_cp2
+//r:3.2
+#define	qtn_help_om_search_xhtml	"Search"  
+
+//d: Command in options menu. go to help content view
+//l: list_single_pane_t1_cp2
+//r:3.2
+#define	qtn_help_om_help_contents	"Help Contents"
+
+//d: Command in options menu. go to Application topic view
+//l: list_single_pane_t1_cp2
+//r:3.2
+#define	qtn_help_om_application_topics	"Application Topics"
+
+//d: Command in options menu. To open the linked html page
+//l: list_single_pane_t1_cp2
+//r:3.2
+#define qtn_help_om_open_hyperlink		"Open link"
+
+//d: Command in options menu. To increase browser font size
+//l: list_single_pane_t1_cp2
+//r:3.2
+#define qtn_help_om_increase_text		"Increase text size"
+
+//d: Command in options menu. To decrease browser font size
+//l: list_single_pane_t1_cp2
+//r:3.2
+#define qtn_help_om_decrease_text		"Decrease text size"
+
+//d: While launching an Application from help with wrong uid/data
+//d: information note with this text is dsplayed.
+//l: popup_note_window
+//r:3.2
+#define qtn_help_note_unable_launch		"Unable to launch application"
+
+//d: When an Application is trying to launch from help using (HTTP)external links.
+//d: information note with this text is dsplayed.
+//l: popup_note_window
+//r:3.2
+#define qtn_help_note_no_internet		"Launching applications from internet content is not allowed"
+
+//d: Command for Middle SoftKey. find keywords, and go to search result view 
+//l: control_pane_t3/opt7
+//r:3.2
+#define qtn_help_msk_find     "Find"
+
+//d: Command for Middle SoftKey. To open the linked html page
+//l: control_pane_t3/opt7
+//r:3.2
+#define qtn_help_msk_open_hyperlink		"Open link"
+
+//d: 1st Item in the Top Level List,Present only if Tutorial is present in the platform.
+//d: 1st Item in the applications Topic List,Present only if Tutorial content is available
+//for that application in the platform.
+//l: navi_text_pane_t1
+//r:5.0
+#define qtn_help_toc_list_item_tutorial    			"Show Tutorial"	
+
+//d: Label for wait note
+//d: This note is used when user install/uninstall an application, which has helps.
+//l: popup_note_wait_window
+//r: 5.0
+#define qtn_help_noteg_install    "Help content changed due to install/uninstallation, please restart Help application to see new app"
+
+//d: Collection for custom applications helps
+//d: This topic is a collection for all of post-build applications
+//l: list_single_pane_t1
+//r: 5.2
+#define qtn_help_toc_app_helps             "Application helps" 
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/rom/AiwHelpProvider.iby	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     Main resource file for the AiwHelpProvider application.
+*
+*
+*/
+
+#ifndef __AIWHELPPROVIDER_IBY__
+#define __AIWHELPPROVIDER_IBY__
+
+#ifdef RD_HELP_AIW_INTEGRATION
+
+
+ECOM_PLUGIN(AiwHelpProvider.dll,AiwHelpProvider.RSC)
+
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/rom/AiwHelpProviderResources.iby	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     Main resource file for the AiwHelpProvider application.
+*
+*
+*/
+
+
+#ifndef __AIWHELPPROVIDERRESOURCES_IBY__
+#define __AIWHELPPROVIDERRESOURCES_IBY__
+
+#ifdef RD_HELP_AIW_INTEGRATION
+data=DATAZ_\APP_RESOURCE_DIR\AiwHelpProviderPlugin.rsc APP_RESOURCE_DIR\AiwHelpProviderPlugin.rsc
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/rom/Cshelp.iby	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     Main resource file for the CsHelp application.
+*
+*
+*/
+
+
+#ifndef __CSHELP_IBY__
+#define __CSHELP_IBY__
+
+#ifdef __SERIES60_HELP // Help files are put in the image only when this flag is defined
+
+#include <hlpmodel.iby>
+
+file=ABI_DIR\BUILD_DIR\HelpEngine.dll    \SHARED_LIB_DIR\HelpEngine.dll
+
+S60_APP_EXE(cshelp)
+S60_APP_AIF_ICONS(cshelp)
+S60_APP_AIF_RSC(cshelp)
+S60_APP_BITMAP(cshelp)
+
+#endif //__SERIES60_HELP
+
+#endif //  __CSHELP_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/rom/CshelpResources.iby	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     Main resource file for the CsHelp application.
+*
+*
+*/
+
+
+#ifndef __CSHELP_RESOURCES_IBY__
+#define __CSHELP_RESOURCES_IBY__
+
+
+
+#ifdef __SERIES60_HELP // Help files are put in the image only when this flag is defined
+
+S60_APP_CAPTION(Cshelp)
+
+//Resource file(s) for CsHelp application
+#ifndef RD_APPS_TO_EXES
+data=ZSYSTEM\Apps\Cshelp\cshelp.rsc  APP_RESOURCE_DIR\cshelp.rsc 
+
+#else
+data=DATAZ_\APP_RESOURCE_DIR\cshelp.rsc                                 APP_RESOURCE_DIR\cshelp.rsc
+#endif
+
+
+#endif //__SERIES60_HELP
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/src/AppLauncherForCSXH.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,453 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  AppLauncherForCSXH class definition
+*
+*/
+
+
+#include "AppLauncherForCSXH.h"
+#include "CSXHAppUi.h"
+#include <cshelp.rsg>
+
+#include <e32std.h>
+#include <apgtask.h>
+#include <apgcli.h> 
+#include <utf.h>
+#include <aknnotewrappers.h> 
+#include <AknGlobalNote.h>
+#include "csxhconstants.h"
+#include <e32std.h> 
+
+
+const TInt KBackSlashesInPrefix = 3;
+#ifndef __SERIES60_30__ 
+	const TUid KUidBrowserApplication = { 0x10008D39 };
+#else
+	const TUid KUidBrowserApplication = { 0x1020724D };
+#endif
+
+const TInt KKeyBlockTime = 100000;  
+
+enum TAppLaunchMode
+            {
+            ENoAppLaunch = 0,   
+            EVSAMode = 1,
+            ECmdMode = 2,
+            EAppLaunchFromInternet = 3,
+            };
+enum TAppLauchParams
+    {
+    EParamsInvalid = 0,
+    EParamsNoMsg,
+    EParamsWithMsg,
+    };
+
+
+AppLauncherForCSXH* AppLauncherForCSXH::NewL()
+    {
+    AppLauncherForCSXH* self = new(ELeave) AppLauncherForCSXH();
+    self->ConstructL();
+    return self;
+    }
+
+AppLauncherForCSXH::AppLauncherForCSXH()
+    {}
+    
+void AppLauncherForCSXH::ConstructL()
+    {
+    iTimer = CPeriodic::NewL( CActive::EPriorityStandard ); 
+    }
+    
+AppLauncherForCSXH::~AppLauncherForCSXH()
+    {
+    if(iTimer)
+        delete iTimer;      
+    }
+
+// --------------------------------------------------------------------------
+// Launches an application based on the Application Launch Link URL
+// --------------------------------------------------------------------------
+TBool AppLauncherForCSXH::LaunchAppL(const TDesC& aUrl,const TDesC& aCurrentUrl)
+    {
+    switch(GetAppLaunchModeL(aUrl,aCurrentUrl))
+        {
+        case ENoAppLaunch:
+            return EFalse;
+        case EAppLaunchFromInternet:
+            HandleAppLauchFromInternetL();
+            return ETrue;
+        case EVSAMode:
+            {
+            if(!LaunchApp(aUrl,ETrue))
+                HandleFailedAppLauchL();
+            return ETrue;
+            }
+        case ECmdMode:
+            {
+            if(!LaunchApp(aUrl,EFalse))
+                HandleFailedAppLauchL();
+            return ETrue;
+            }   
+        default:
+            return EFalse;
+        }
+    }
+
+TInt AppLauncherForCSXH::GetAppLaunchModeL(const TDesC& aUrl,const TDesC& aCurrentUrl)
+    {
+    TInt Position = aUrl.Find(_L("app://vsa@localhost/"));
+    if(KErrNotFound != Position && 0 == Position)
+        {
+        return CheckAppLaunchFromInternetL(EVSAMode,aCurrentUrl);
+        }
+    
+    Position = aUrl.Find(_L("app://cmd@localhost/"));
+    if(KErrNotFound != Position && 0 == Position)
+        {
+        return CheckAppLaunchFromInternetL(ECmdMode,aCurrentUrl);
+        }
+    
+    return ENoAppLaunch;    
+    }
+
+TBool AppLauncherForCSXH::LaunchApp(const TDesC& aUrl, TBool aVSAMode)
+    {
+    iParam1.Copy(KEmptyString);
+    iParam2.Copy(KEmptyString);
+    iParam3.Copy(KEmptyString);
+    iParam4.Copy(KEmptyString);
+    
+    switch(CheckMsgParams(aUrl))
+        {
+        case EParamsInvalid:
+            return EFalse;
+        case EParamsNoMsg:
+            {
+            ExtractTwoParams(aUrl);
+            if(aVSAMode)
+                {
+                TInt32 AId,VId;
+                GetUid(iParam1,AId);
+                GetUid(iParam2,VId);                
+                TRAPD(res,CCSXHAppUi::GetInstance()->AppLaunchL(AId,VId));
+                return (res == KErrNone) ? ETrue : EFalse;  
+                }
+            else
+                {
+                return LaunchCmdApp(EFalse);
+                }
+            }
+        case EParamsWithMsg:
+            {
+            ExtractFourParams(aUrl);
+            if(aVSAMode)
+                {
+                TInt32 AId,VId,MId;
+                GetUid(iParam1,AId);
+                GetUid(iParam2,VId);
+                GetUid(iParam3,MId);
+                TRAPD(res,CCSXHAppUi::GetInstance()->AppLaunchL(AId,VId,MId,iParam4));
+                return (res == KErrNone) ? ETrue : EFalse;  
+                }
+            else
+                {
+                return LaunchCmdApp(ETrue);
+                }
+            }
+        default:
+            return EFalse;
+        }
+    }
+TBool AppLauncherForCSXH::LaunchCmdApp(TBool aParamsMode)
+    {
+    TRAPD(res,LaunchCmdAppL(aParamsMode));
+    if(res != KErrNone)
+        return EFalse;
+    return ETrue;
+    }
+TBool AppLauncherForCSXH::LaunchCmdAppL(TBool aParamsMode)
+    {
+    /*valid cases
+    app://cmd@localhost/APP_NAME/APP_UID
+    app://cmd@localhost/APP_NAME/APP_UID/MSG_UID/Parameters
+    */
+    TApaTask task = GetCmdAppTask();
+    if (task.Exists())
+        {//App is already running
+        if(aParamsMode)
+            SendMsgToCmdAppTaskL(task);
+        
+        task.BringToForeground();
+        return ETrue;
+        }
+    //Application has to be started
+    CApaCommandLine* cmdLine=CApaCommandLine::NewLC();
+    cmdLine->SetExecutableNameL(iParam1);
+    cmdLine->SetCommandL(EApaCommandRun);
+    
+    RApaLsSession lsSession;
+    User::LeaveIfError(lsSession.Connect());
+    CleanupClosePushL(lsSession);
+    User::LeaveIfError(lsSession.StartApp(*cmdLine));
+    CleanupStack::PopAndDestroy(&lsSession);
+    CleanupStack::PopAndDestroy(cmdLine);   
+    if(aParamsMode)
+        {
+        iCount = 0; 
+        TCallBack timer_Callback_to_terminateApp( Timer_Callback_to_TerminateApp,this );
+        StartTimer(timer_Callback_to_terminateApp);    
+        }
+    
+    return ETrue;
+    }
+    
+TInt AppLauncherForCSXH::Timer_Callback_to_TerminateApp(TAny* aPtr)
+    {
+    return static_cast<AppLauncherForCSXH*>( aPtr )->SendMsgToApplication();
+    }
+        
+TInt AppLauncherForCSXH::SendMsgToApplication()
+    {
+    //If parameters has to be passed then the following is required
+    TApaTask cmdTask = GetCmdAppTask();
+    if (cmdTask.Exists())
+        {
+        TRAPD(res,SendMsgToCmdAppTaskL(cmdTask));       
+        if(res != KErrNone)
+            return 0;
+        cmdTask.BringToForeground();
+        iTimer->Cancel();
+        }
+    else if(++iCount > 20)
+        {
+        iTimer->Cancel();       
+        }
+        return 0;       
+    }   
+        
+TApaTask AppLauncherForCSXH::GetCmdAppTask()    
+    {
+    TInt32 AId;
+    GetUid(iParam2,AId);
+    TApaTaskList taskList(CCSXHAppUi::GetInstance()->GetWsSession());
+    TUid KtestAppUid( TUid::Uid( AId ) ); 
+    return taskList.FindApp(KtestAppUid);
+    }
+void AppLauncherForCSXH::SendMsgToCmdAppTaskL(TApaTask& aTask)
+    {
+    
+    TInt32 MId;
+    GetUid(iParam3,MId);
+    TUid KtestMsgUid( TUid::Uid( MId ) ); 
+    HBufC8* params = CnvUtfConverter::ConvertFromUnicodeToUtf8L(iParam4);
+    CleanupStack::PushL(params);
+    aTask.SendMessage (KtestMsgUid, *params); 
+    CleanupStack::PopAndDestroy(params);
+    }
+    
+void AppLauncherForCSXH::HandleFailedAppLauchL()
+    {
+    HBufC* ErrorMessage = CCSXHAppUi::GetCoeEnv()->AllocReadResourceLC(
+    				R_QTN_HELP_NOTE_UNABLE_TO_LAUNCH_APP);      
+    CAknGlobalNote* note = CAknGlobalNote::NewLC();
+    note->ShowNoteL(EAknGlobalInformationNote, *ErrorMessage);
+    CleanupStack::PopAndDestroy(note); 
+    CleanupStack::PopAndDestroy(ErrorMessage); 
+    }
+void AppLauncherForCSXH::HandleAppLauchFromInternetL()
+    {
+    HBufC* ErrorMessage = CCSXHAppUi::GetCoeEnv()->AllocReadResourceLC(
+    				R_QTN_HELP_NOTE_APP_LAUNCH_NOT_ALLOWED);
+    CAknGlobalNote* note = CAknGlobalNote::NewLC();
+    note->ShowNoteL(EAknGlobalInformationNote, *ErrorMessage);
+    CleanupStack::PopAndDestroy(note); 
+    CleanupStack::PopAndDestroy(ErrorMessage);        
+    }
+
+TInt AppLauncherForCSXH::CheckAppLaunchFromInternetL(TInt aCurrentMode,const TDesC& /*aCurrentUrl*/ )
+    {
+       
+    return aCurrentMode; 
+    //BrowserNG is lauched for Externalhyperlinks, 
+    //All the security issues are addresed by BrowserNG,    
+    
+    /*(0 == aCurrentUrl.Find(KFileUrlPrefix) ) ? 
+                    aCurrentMode : EAppLaunchFromInternet;*/
+    }
+
+TInt AppLauncherForCSXH::CheckMsgParams(const TDesC& aUrl)
+    {
+    /*
+    The following are valid cases
+    app://vsa@localhost/APP_UID/VIEW_UID
+    app://vsa@localhost/APP_UID/VIEW_UID/MSG_UID/Parameters
+    app://cmd@localhost/APP_NAME/APP_UID
+    app://cmd@localhost/APP_NAME/APP_UID/MSG_UID/Parameters
+    
+    That is, it should have exactly 4 backslashes or 
+    >= 6 backslashes (considering the possibility that parameters
+    can have embedded backslashes)
+    */
+    TBuf<KBackSlashLength> backSlash(KBackSlash);
+    TInt count = 0;
+    
+    for(TInt i = 0 ; i < aUrl.Length() ; ++i)
+        {
+        if(KErrNotFound != backSlash.Find(&aUrl[i],KBackSlashLength))
+            ++count;
+        }
+    
+    if(count == 4)
+        return EParamsNoMsg;
+    else if (count >=6)
+        return EParamsWithMsg;
+    else    
+        return EParamsInvalid;
+    }
+
+void AppLauncherForCSXH::ExtractTwoParams(const TDesC& aUrl)
+    {
+    /*Will be called for the following cases
+    app://vsa@localhost/APP_UID/VIEW_UID
+    app://cmd@localhost/APP_NAME/APP_UID
+    */
+    iParam1.Copy(KEmptyString);
+    iParam2.Copy(KEmptyString);
+    
+    TBuf<KBackSlashLength> backSlash(KBackSlash);
+    TInt count = 0;
+    TInt pos;
+    
+    for(pos = 0; pos < aUrl.Length() ; ++pos)
+        {
+        if(KErrNotFound != backSlash.Find(&aUrl[pos],KBackSlashLength))
+            ++count;
+        if(count == KBackSlashesInPrefix)
+            break;
+        }
+    TPtrC16 url = aUrl.Mid(pos + 1);
+    pos = url.Find(KBackSlash);
+    iParam1 = url.Left(pos);
+    iParam2 = url.Mid(pos + 1);
+    }
+
+void AppLauncherForCSXH::ExtractFourParams(const TDesC& aUrl)
+    {
+    /*Will be called for the following cases
+    app://vsa@localhost/APP_UID/VIEW_UID/MSG_UID/Parameters
+    app://cmd@localhost/APP_NAME/APP_UID/MSG_UID/Parameters
+    */
+    iParam1.Copy(KEmptyString);
+    iParam2.Copy(KEmptyString);
+    iParam3.Copy(KEmptyString);
+    iParam4.Copy(KEmptyString);
+    
+    TBuf<KBackSlashLength> backSlash(KBackSlash);
+    TInt count = 0;
+    TInt pos;
+    
+    for(pos = 0; pos < aUrl.Length() ; ++pos)
+        {
+        if(KErrNotFound != backSlash.Find(&aUrl[pos],KBackSlashLength))
+            ++count;
+        if(count == KBackSlashesInPrefix)
+            break;
+        }
+        
+    TPtrC16 url = aUrl.Mid(pos + 1);
+    pos = url.Find(KBackSlash);
+    iParam1 = url.Left(pos);
+    
+    TPtrC16 url2 = url.Mid(pos + 1);
+    pos = url2.Find(KBackSlash);
+    iParam2 = url2.Left(pos);
+
+    TPtrC16 url3 = url2.Mid(pos + 1);
+    pos = url3.Find(KBackSlash);
+    iParam3 = url3.Left(pos);
+    
+    iParam4 = url3.Mid(pos+1);
+    }
+
+void AppLauncherForCSXH::GetUid(TPtrC aUid, TInt32& aResult)
+    {
+    TInt hexPos = aUid.Find(_L("x"));
+    if(KErrNotFound == hexPos)
+        TLex(aUid).Val(aResult); 
+    else
+        {       
+        TPtrC16 uidt = aUid.Mid(hexPos+1);
+        TInt64 res;
+        //During this operation sometimes values exceed TInt32, but the end result is always
+        //fits into TInt32
+        TLex(uidt).Val(res,EHex); 
+        aResult = res;
+        }
+    }
+
+void AppLauncherForCSXH::LaunchBrowserNGL(const TDesC& aUrl)
+    {    
+    _LIT( KBrowserCmdFetchUrl, "4 " );
+    HBufC* param = HBufC::NewLC( KBrowserCmdFetchUrl().Length() + 
+                                 aUrl.Length() );
+	TPtr paramPtr = param->Des();
+    paramPtr.Copy( KBrowserCmdFetchUrl );
+    paramPtr.Append( aUrl );
+    
+    if(!SendMsgToBrowserNGL(param))
+	    {    
+		RApaLsSession appArcSession;
+	    User::LeaveIfError( appArcSession.Connect() );
+	    CleanupClosePushL<RApaLsSession>( appArcSession );
+	    
+	    TThreadId id;
+	    User::LeaveIfError
+	        (
+	            appArcSession.StartDocument(*param,KUidBrowserApplication,id )
+	        );
+	    CleanupStack::PopAndDestroy( &appArcSession );
+	    }
+	    
+	CleanupStack::PopAndDestroy( param );
+    }
+    
+TBool AppLauncherForCSXH::SendMsgToBrowserNGL(const HBufC* aUrl)
+    {
+    TApaTaskList taskList(CCSXHAppUi::GetInstance()->GetWsSession());
+    TApaTask task = taskList.FindApp(KUidBrowserApplication);       
+    if(task.Exists())
+        {   
+        // 8-bit buffer is required.
+        HBufC8* param8 = HBufC8::NewLC( aUrl->Length() );
+        param8->Des().Copy( *aUrl );
+        task.SendMessage( TUid::Uid( 0 ), *param8 ); // Uid is not used
+        CleanupStack::PopAndDestroy( param8 );
+        return ETrue;           
+        }
+    else
+        return EFalse;
+    }
+    
+void AppLauncherForCSXH::StartTimer(TCallBack aCallBack)
+    {
+    if( iTimer->IsActive() )
+        {
+            iTimer->Cancel();
+        }
+
+    iTimer->Start(
+        TTimeIntervalMicroSeconds32( KKeyBlockTime ),
+        TTimeIntervalMicroSeconds32( KKeyBlockTime ),
+        aCallBack );
+    }    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/src/CSXH.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  
+*
+*/
+
+
+#include "CSXHApplication.h"
+#include <eikstart.h>
+
+#ifdef __UI_FRAMEWORKS_V2__
+
+// Create an application, and return a pointer to it
+CApaApplication* NewApplication()
+    {
+    return new CCSXHApplication;
+    }
+
+TInt E32Main()
+    {
+    return EikStart::RunApplication(NewApplication);
+    }
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// The following is required for wins on EKA1 (using the exedll target)
+//
+#if defined(__WINS__) && !defined(EKA2)
+EXPORT_C TInt WinsMain(TDesC* aCmdLine)
+    {
+    return EikStart::RunApplication(NewApplication, aCmdLine);
+    }
+
+TInt E32Dll(TDllReason)
+    {
+    return KErrNone;
+    }
+#endif
+
+#else // __UI_FRAMEWORKS_V2__
+
+// Create an application, and return a pointer to it
+EXPORT_C CApaApplication* NewApplication()
+  {
+  return new CCSXHApplication;
+  }
+
+// DLL entry point, return that everything is ok
+GLDEF_C TInt E32Dll(TDllReason)
+  {
+  return KErrNone;
+  }
+
+#endif // __UI_FRAMEWORKS_V2__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/src/CSXHAppUi.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,565 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHAppUi class definition
+*
+*/
+
+
+#include "CSXHAppUi.h"
+#include "CSXHGenericView.h"
+#include "CSXHHtmlTopicView.h"
+#include "CSXHLegacyTopicView.h"
+#include "CsHelp.hrh"
+#include <cshelp.rsg>
+#include "CSXHAppUi.h"
+#include "CSXHDocument.h"
+
+#include "CSXHHelpDataBase.h"
+#include "CSXHViewIDs.h"
+
+#include <avkon.hrh>
+#include <utf.h>
+#include <aknnotewrappers.h> 
+#include <AknGlobalNote.h>
+#include <akninputblock.h>
+#include <hlplch.h>
+
+#include "csxhconstants.h"
+
+#ifdef FF_HELP_TUTORIAL_MERGE
+#include <AiwServiceHandler.h>
+
+#if defined(_DEBUG) && defined(__WINS__)
+#include <f32file.h>
+#include <flogger.h>
+_LIT(KLogDir, "csxh");
+_LIT(KLogFile, "csxh.txt");
+inline void FPrint(const TRefByValue<const TDesC> aFmt, ...)
+    {
+    VA_LIST list;
+    VA_START(list,aFmt);
+    RFileLogger::WriteFormat(KLogDir, KLogFile, EFileLoggingModeAppend, aFmt, list);
+    }
+#define FLOG(a) {FPrint(a);}
+#define FLOGF   FPrint
+#else //_DEBUG
+#define FLOG(a)
+#define FLOGF
+#endif //_DEBUG
+#endif // FF_HELP_TUTORIAL_MERGE
+CCSXHAppUi* CCSXHAppUi::iInstance = NULL;
+
+// ConstructL is called by the application framework
+void CCSXHAppUi::ConstructL()
+    {
+#ifndef __SERIES60_30__         
+    BaseConstructL(EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
+#else
+    BaseConstructL(EAknEnableSkin);
+#endif  
+  
+#ifdef FF_HELP_TUTORIAL_MERGE
+    LoadTutorialService();
+#endif // FF_HELP_TUTORIAL_MERGE
+    SetKeyEventFlags( CAknAppUiBase::EDisableSendKeyShort | CAknAppUiBase::EDisableSendKeyLong );
+    iTOC1View = CCSXHGenericView::NewL(KCSXHToc1ViewID,R_CSXH_TOC1);
+    AddViewL(iTOC1View); 
+    
+    iTOC2View = NULL;
+    iKywdTOC1View = NULL;
+    iKywdTOC2View = NULL;
+    iHtmlTopicView = NULL;
+    iLegacyTopicView = NULL;
+    iLegacyContextTopicView = NULL;
+    iAppHelpsTOC1View = NULL;
+    iAppHelpsTOC2View = NULL;
+    
+    SetDefaultViewL(*iTOC1View);  
+        
+    iRuntimeWatcher = CCSXHRuntimeAppWatcher::NewL();
+    iRuntimeWatcher->SetObserver( this );
+    iRuntimeWatcher->Start();
+#ifdef _DEBUG
+    RDebug::Print( _L("Help app launched") );
+#endif
+    }
+
+CCSXHAppUi::CCSXHAppUi()                              
+    {
+    iInstance = this;
+    }
+
+CCSXHAppUi::~CCSXHAppUi()
+    {
+#ifdef FF_HELP_TUTORIAL_MERGE
+
+    if(iServiceHandler)
+        {
+        delete iServiceHandler;
+        }
+
+#endif // FF_HELP_TUTORIAL_MERGE
+#ifdef _DEBUG
+    RDebug::Print(_L("Help app ended"));
+#endif
+    if ( iRuntimeWatcher )
+        delete iRuntimeWatcher;
+
+    }
+
+// --------------------------------------------------------------------------
+// Message Handler
+// --------------------------------------------------------------------------
+void CCSXHAppUi::HandleCommandL(TInt aCommand)
+    {
+    switch(aCommand)
+        {
+        case EEikCmdExit:
+        case EAknSoftkeyExit:
+        case EAknSoftkeyClose:
+            Exit();
+            break;
+  
+        case ECSXHOpenTopicText:
+        case ECSXHOpenItemPropagated:
+        case ECSXHOpenItem:        
+            {
+            CAknInputBlock* inputBlock = CAknInputBlock::NewLC();
+            ActivateDisplayTopicViewL();
+            CleanupStack::PopAndDestroy( inputBlock ); 
+            }
+            break;
+        case ECSXHSearchText:
+            {
+            CCSXHDocument* doc = static_cast<CCSXHDocument*>(Document());
+            doc->SetDisplayTopic(doc->GetHelpDataBase()->GetKywdTopics());
+            ActivateDisplayTopicViewL();
+            }
+            break;
+        default:
+            break;
+        }
+    }
+void CCSXHAppUi::InitDisplayTopicViewL(TUid aViewID)
+	{
+	if(aViewID == KCSXHToc1ViewID)
+		return;
+	
+	
+  	if(aViewID == KCSXHContextLegacyTopicViewID && iLegacyContextTopicView == NULL)	
+	 	{
+        iLegacyContextTopicView = CCSXHLegacyTopicView::NewL (KCSXHContextLegacyTopicViewID,
+                                                              R_CSHELP_TOPICFORCONTEXT,
+                                                              ClientRect());
+    	AddViewL(iLegacyContextTopicView);
+	 	}	 	   
+	else if(aViewID == KCSXHToc2ViewID && iTOC2View == NULL)
+		{
+		iTOC2View = CCSXHGenericView::NewL(KCSXHToc2ViewID,R_TOPICLIST);
+    	AddViewL(iTOC2View); 
+		}
+	else if(aViewID == KCSXHToc2AppHelpsViewID && iAppHelpsTOC2View == NULL)
+	    {
+	    iAppHelpsTOC2View = CCSXHGenericView::NewL(KCSXHToc2AppHelpsViewID,R_TOPICLIST);
+	    AddViewL(iAppHelpsTOC2View);
+	    }
+	 else if(aViewID == KCSXHKywdToc1ViewID && iKywdTOC1View == NULL)
+	 	{
+	 	iKywdTOC1View = CCSXHGenericView::NewL(KCSXHKywdToc1ViewID,R_KYWDTOC1LIST);
+    	AddViewL(iKywdTOC1View);
+	 	}
+	 else if(aViewID == KCSXHKywdToc2ViewID && iKywdTOC2View == NULL)	
+	 	{
+	 	iKywdTOC2View = CCSXHGenericView::NewL(KCSXHKywdToc2ViewID,R_KYWDTOC2LIST);
+    	AddViewL(iKywdTOC2View); 
+	 	}
+	 else if(aViewID == KCSXHLegacyTopicViewID && iLegacyTopicView == NULL)	
+	 	{
+        iLegacyTopicView = CCSXHLegacyTopicView::NewL(KCSXHLegacyTopicViewID,
+                                                      R_TOPICTEXTLIST,ClientRect());
+    	AddViewL(iLegacyTopicView);
+	 	}	
+	 	
+	 else if(aViewID == KCSXHContextHtmlTopicViewID )	
+	 	{
+	 	if(!iHtmlTopicView)
+	 		{
+            iHtmlTopicView = CCSXHHtmlTopicView::NewL(KCSXHHtmlTopicViewID,
+                                                      R_CSHELP_HTMLTOPICFORCONTEXT,
+                                                      ClientRect());
+    		AddViewL(iHtmlTopicView);	
+	 		}
+	 	else
+	 		{
+	 		//View is already created update the softkeys to Options and Close
+	 		iHtmlTopicView->SetViewTypeL(CCSXHHtmlTopicView::EContextHtmlView);
+	 		}
+  	 	}	
+	 else if(aViewID == KCSXHHtmlTopicViewID )	
+	 	{
+	 	if(!iHtmlTopicView)
+	 		{
+            iHtmlTopicView = CCSXHHtmlTopicView::NewL(KCSXHHtmlTopicViewID,
+                                                      R_CSHELP_HTMLTOPICVIEW,
+                                                      ClientRect());
+    		AddViewL(iHtmlTopicView);
+	 		}
+	 	else
+	 		{
+	 		//View is already created update the softkeys to Options and Back
+	 		iHtmlTopicView->SetViewTypeL(CCSXHHtmlTopicView::EHtmlView);
+	 		}
+	 	}
+    else if ( aViewID == KCSXHToc1AppHelpsViewID && !iAppHelpsTOC1View )
+        {
+        iAppHelpsTOC1View = CCSXHGenericView::NewL( KCSXHToc1AppHelpsViewID, R_TOPICLIST );
+        AddViewL( iAppHelpsTOC1View ); 
+        }
+	}
+// --------------------------------------------------------------------------
+// Activates the view corresponding to the topic to be displayed
+// It also sets for recreating the container dending on the view to be 
+// activated, 
+// 1) Search Pane in Search Result View will be cleared if user 
+// opens the Search View.
+// 2)Search Pane in Application Topics view will be cleared, if user opens 
+//      a)Help Contents View 
+//      b)Search View 
+//      c)Context Senisitive view
+// --------------------------------------------------------------------------
+void CCSXHAppUi::ActivateDisplayTopicViewL()
+    {
+    CCSXHDocument* doc = static_cast<CCSXHDocument*>(Document());
+    TUid viewId = doc->GetDisplayTopic()->GetViewID();
+    InitDisplayTopicViewL(viewId);
+    
+    if(viewId == KCSXHKywdToc1ViewID )
+        {
+        if(iKywdTOC2View)
+        	iKywdTOC2View->ResetContainer();
+        if(iTOC2View)
+        	iTOC2View->ResetContainer();
+        if (iAppHelpsTOC2View)
+        	iAppHelpsTOC2View->ResetContainer();
+        }
+	else if(viewId == KCSXHToc1ViewID ||
+	        viewId == KCSXHContextHtmlTopicViewID ||
+            viewId == KCSXHContextLegacyTopicViewID ||
+            viewId == KCSXHToc1AppHelpsViewID)
+	    {
+	    if(iTOC2View)
+			iTOC2View->ResetContainer();
+	    if (iAppHelpsTOC2View)
+	    	iAppHelpsTOC2View->ResetContainer();
+	    }
+/*	else if(viewId == KCSXHKywdToc1ViewID)  
+		{
+		doc->InitProgressBarL();
+		}
+*/	
+	if(viewId == KCSXHContextHtmlTopicViewID)    
+		viewId = KCSXHHtmlTopicViewID;
+    ActivateLocalViewL(viewId);
+    }
+void CCSXHAppUi::HandleForegroundEventL(TBool aForeground)
+	{
+	// Call Base class method
+ 	CAknAppUi::HandleForegroundEventL(aForeground);
+
+ 	if(!aForeground && iView && 
+ 	iView->Id() != KCSXHHtmlTopicViewID
+ 	&& iHtmlTopicView)
+ 		{
+ 		//put NUll first in for bug ESXU-7JA9NS
+ 		iHtmlTopicView = NULL;
+     	// We have lost the focus
+     	//Check if the HTML view is the last active view. If it not delete it 
+     	//to free the memory used by the browser control
+     	RemoveView(KCSXHHtmlTopicViewID);
+     	//delete iHtmlTopicView;
+    	}
+	}
+// --------------------------------------------------------------------------
+// It sets a flag in the View for recreating the container 
+// --------------------------------------------------------------------------
+void CCSXHAppUi::ResetTOC2ViewContainer()
+    {
+    if(iTOC2View)
+    	iTOC2View->ResetContainer();	
+    }
+// --------------------------------------------------------------------------
+// Context sensitive help launch handling. Help is not running
+// --------------------------------------------------------------------------
+TBool CCSXHAppUi::ProcessCommandParametersL(TApaCommand aCommand,
+                                              TFileName& /* aDocumentName */,
+                                              const TDesC8& aTail)
+    {
+    if (aCommand == EApaCommandOpen)
+        { // when another app launches the help app
+        HandleContextSensitiveLaunchL(aTail);
+        }
+    return EFalse;
+    }
+
+// --------------------------------------------------------------------------
+// Context sensitive help launch handling. Help is already running
+// --------------------------------------------------------------------------
+MCoeMessageObserver::TMessageResponse CCSXHAppUi::HandleMessageL(
+           TUint32 aClientHandleOfTargetWindowGroup,
+           TUid aMessageUid,
+           const TDesC8& aMessageParameters)
+    {
+    if (aMessageUid == KHlpAppWsMsg)
+        {
+        HandleContextSensitiveLaunchL(aMessageParameters);
+        return EMessageHandled;
+        }
+    return CAknViewAppUi::HandleMessageL(aClientHandleOfTargetWindowGroup,
+                                         aMessageUid,
+                                         aMessageParameters);
+    }
+
+// --------------------------------------------------------------------------
+// Opens the context topic. If no topic is avbl then toc1 view is activated
+// --------------------------------------------------------------------------
+void  CCSXHAppUi::HandleContextSensitiveLaunchL(const TDesC8& aContext )   
+    {
+    CCSXHDocument* doc = static_cast<CCSXHDocument*>(Document());
+        
+    if(doc->SetContextTopicAsDisplayTopicL(aContext))
+        {
+        TRAPD(res,ActivateDisplayTopicViewL());
+        if(res == KErrNone)
+            return;
+        }
+    
+    //No topic avaliable, activate the TOC1 View & Pop a message
+    doc->SetDisplayTopic(doc->GetHelpDataBase()->GetMainTopics());
+    ActivateDisplayTopicViewL();
+        
+//    HBufC* ErrorMessage = iCoeEnv->AllocReadResourceLC(R_TYPE_NO_HELP_TOPICS);      
+//    CAknGlobalNote* note = CAknGlobalNote::NewLC();
+//    note->ShowNoteL(EAknGlobalInformationNote, *ErrorMessage);
+
+//    CleanupStack::PopAndDestroy(note); 
+//    CleanupStack::PopAndDestroy(ErrorMessage); 
+    }
+
+CCSXHAppUi* CCSXHAppUi::GetInstance()
+    {
+    return iInstance;
+    }
+RWsSession& CCSXHAppUi::GetWsSession()
+    {
+    return iInstance->iCoeEnv->WsSession();
+    }
+CCoeEnv* CCSXHAppUi::GetCoeEnv()
+    {
+    return iInstance->iCoeEnv;
+    }
+
+// --------------------------------------------------------------------------
+// Launches an application based on the Application UID and a View ID
+// --------------------------------------------------------------------------
+void CCSXHAppUi::AppLaunchL(TInt32& aAppId,TInt32& aVId)
+    {
+    //Convert from TInt to TUid
+    TUid KtestAppUid( TUid::Uid( aAppId ) ); 
+    TUid KtestViewUid( TUid::Uid( aVId ) ); 
+      
+    //Launch Application
+    TVwsViewId AppLaunch(KtestAppUid,KtestViewUid);
+    ActivateViewL(AppLaunch);
+    }
+
+// --------------------------------------------------------------------------
+// Launches an application based on the Application UID and a View ID
+// --------------------------------------------------------------------------
+void CCSXHAppUi::AppLaunchL(TInt32& aAppId,TInt32& aVId,
+                            TInt32& aMsgId,
+                            const TBuf<KMaxParamLength>& aParams)
+    {
+    //Convert from TInt to TUid
+    TUid AplnUid( TUid::Uid( aAppId ) ); 
+    TUid AplnViewUid( TUid::Uid( aVId ) ); 
+    TUid MsgUid( TUid::Uid( aMsgId ) ); 
+      
+    //Launch Application
+    TVwsViewId AppLaunch(AplnUid,AplnViewUid);
+    
+    HBufC8* params = CnvUtfConverter::ConvertFromUnicodeToUtf8L(aParams);
+    CleanupStack::PushL(params);
+    ActivateViewL(AppLaunch,MsgUid,*params);
+    CleanupStack::PopAndDestroy(params);
+    }
+ 
+void CCSXHAppUi::PropagateResourceChange(TInt aType)
+    {
+    iTOC1View->ResourceChangeHdl(aType);
+    if(iKywdTOC1View)
+    	iKywdTOC1View->ResourceChangeHdl(aType);
+    if(iKywdTOC2View)
+    	iKywdTOC2View->ResourceChangeHdl(aType);
+    if(iTOC2View)
+		iTOC2View->ResourceChangeHdl(aType);    
+    if (iAppHelpsTOC2View)
+    	iAppHelpsTOC2View->ResourceChangeHdl(aType);
+    if (iAppHelpsTOC1View)
+        iAppHelpsTOC1View->ResourceChangeHdl(aType);
+    if(iHtmlTopicView)
+    	iHtmlTopicView->ResourceChangeHdl(aType);
+    if(iLegacyTopicView)
+    	iLegacyTopicView->ResourceChangeHdl(aType);
+    if(iLegacyContextTopicView)
+    	iLegacyContextTopicView->ResourceChangeHdl(aType);
+    }
+ 
+void CCSXHAppUi::RuntimeUpdateIndex()
+    {
+    CAknNoteDialog* dlg = new CAknNoteDialog();
+    if (dlg != NULL)
+        {
+        dlg->SetTimeout( CAknNoteDialog::EShortTimeout );
+        dlg->SetTone( CAknNoteDialog::ENoTone );
+        TRAP_IGNORE(dlg->ExecuteLD(R_CSHELP_INSTALL_UNINSTALL_NOTE));
+        }
+    }
+   
+       
+#ifdef FF_HELP_TUTORIAL_MERGE
+// --------------------------------------------------------------------------
+// CCSXHAppUi::NewParamListLC
+// Create paramlist for provider.
+// --------------------------------------------------------------------------
+CAiwGenericParamList* CCSXHAppUi::NewParamListLC(
+                                            const TCoeHelpContext& aContext)
+    {
+    TAiwVariant variant1;
+    TAiwVariant variant2;
+    variant1.Set(aContext.iMajor);
+    TAiwGenericParam param1(EGenericParamHelpItem, variant1);
+    variant2.Set(aContext.iContext);
+    TAiwGenericParam param2(EGenericParamHelpItem, variant2);
+    CAiwGenericParamList* list = CAiwGenericParamList::NewLC();
+    list->AppendL(param1);
+    list->AppendL(param2);
+    return list;
+    }
+
+// --------------------------------------------------------------------------
+// CCSXHAppUi::LoadTutorialService
+// Load service handler and attach interest for using tutorial service command.
+// --------------------------------------------------------------------------
+void CCSXHAppUi::LoadTutorialServiceL()
+    {
+    iServiceHandler = CAiwServiceHandler::NewL();
+
+    // Create AIW interest
+    RCriteriaArray interest;
+
+    iServiceHandler->AttachL(R_AIWTUTORIALAPP_INTEREST);
+
+    //Tutorial AIW provider exists or not
+    iTutorialExists = EFalse;
+    iServiceHandler->GetInterest(interest);
+    if(interest.Count() > 0)
+        {
+        FLOGF(_L("CCSXHAppUi::LoadTutorialService() - interest.Count()=%d"), interest.Count());
+        CAiwCriteriaItem* testCriteria = interest[0];
+        if(iServiceHandler->NbrOfProviders(interest[0]) > 0)
+            {
+            FLOGF(_L("CCSXHAppUi::LoadTutorialService() - NbrOfProviders()=%d"), iServiceHandler->NbrOfProviders(interest[0]));
+            iTutorialExists = ETrue;
+            }
+        }
+    interest.Close();
+    }
+
+// --------------------------------------------------------------------------
+// CCSXHAppUi::CallTutorialAiwProviderL
+// If tutorial exists,call play presentation command.
+// --------------------------------------------------------------------------
+void CCSXHAppUi::CallTutorialAiwProviderL()
+    {
+    CAiwGenericParamList* inlist = NewParamListLC( iTCoeHelpContext );
+
+    iServiceHandler->ExecuteServiceCmdL( KPlayPresentation,
+                                         *inlist,
+                                         iServiceHandler->OutParamListL() );
+    CleanupStack::PopAndDestroy();   //inlist
+    }
+
+// --------------------------------------------------------------------------
+// CCSXHAppUi::IsApplicationPresentInTutorialL
+// If tutorial exists,identify the presentation needed exist or not.
+// --------------------------------------------------------------------------
+TBool CCSXHAppUi::IsApplicationPresentInTutorialL()
+    {
+    TBool Result = EFalse;
+    //__ASSERT_DEBUG( iTutorialExists, User::Panic(_L("TutAiwHlp"),-1));
+    if(iTutorialExists )
+        {
+        CAiwGenericParamList* inlist = NewParamListLC(iTCoeHelpContext) ;
+
+        CAiwGenericParamList* outlist = CAiwGenericParamList::NewLC();
+
+        TUid maj = iTCoeHelpContext.iMajor;
+        TCoeContextName con = iTCoeHelpContext.iContext;
+
+        FLOGF(_L("CCSXHAppUi::IsApplicationPresentInTutorialL() - 0x%08x %S"),maj,&con);
+
+        //checks if the application specific presentation exists.
+        //Parameter list inlist must contain AppUid which refers to presentation.
+        // The other parameters are not used.
+        //The result is returned in outlist parameter list.
+        //First parameter in the outlist contains ETrue if there is presentation
+        //available and EFalse if there is not.
+        iServiceHandler->ExecuteServiceCmdL( KPresentationExists,
+                                             *inlist, *outlist );
+
+        FLOG(_L("CCSXHAppUi::IsApplicationPresentInTutorialL() - cp-1"));
+
+        //__ASSERT_DEBUG( outlist->Count() > 0, User::Panic(_L("TutAiwHlpO"),-1));
+        __ASSERT_DEBUG(outlist->Count(), User::Panic(_L("outlist"),0));
+
+        FLOG(_L("CCSXHAppUi::IsApplicationPresentInTutorialL() - cp-2"));
+        if( outlist->Count() > 0)
+            {
+            FLOG(_L("CCSXHAppUi::IsApplicationPresentInTutorialL() - cp-2.4"));
+            TAiwGenericParam param = (*outlist)[0];
+            TAiwVariant variant = param.Value();
+            TInt32 val(0);
+
+            if(variant.Get(val) && val)
+                {
+                Result = ETrue;
+                }
+            FLOG(_L("CCSXHAppUi::IsApplicationPresentInTutorialL() - cp-3"));
+            __ASSERT_DEBUG( variant.Get(val) && val, User::Panic(_L("TutAiwHlpV"),-1));
+            }
+        CleanupStack::PopAndDestroy();   //outlist
+        CleanupStack::PopAndDestroy();   //inlist
+        }
+    return Result;
+    }
+
+// --------------------------------------------------------------------------
+// CCSXHAppUi::SetHelpContext
+// If tutorial exists,identify the presentation needed exist or not.
+// --------------------------------------------------------------------------
+void CCSXHAppUi::SetHelpContext(TCoeHelpContext aTCoeHelpContext)
+    {
+    iTCoeHelpContext = aTCoeHelpContext;
+    }
+#endif // FF_HELP_TUTORIAL_MERGE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/src/CSXHApplication.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHApplication class definition
+*
+*/
+
+
+#include "CSXHDocument.h"
+#include "CSXHApplication.h"
+
+// UID for the application, this should correspond to the uid defined in the mmp file
+static const TUid KUidCSXHApp = {0x10005234};
+
+CApaDocument* CCSXHApplication::CreateDocumentL()
+    {  
+    // Create an CSXH document, and return a pointer to it
+    CApaDocument* document = CCSXHDocument::NewL(*this);
+    return document;
+    }
+
+TUid CCSXHApplication::AppDllUid() const
+    {
+    // Return the UID for the CSXH application
+    return KUidCSXHApp;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/src/CSXHDocument.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,181 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHDocument class definition
+*
+*/
+
+
+#include "CSXHDocument.h"
+#include "CSXHAppUi.h"
+
+#include "CSXHHelpDataBase.h"
+#include "CSXHKywdTOC1.h"
+#include "CSXHViewIDs.h"
+#include <eikprogi.h>
+
+#include <cshelp.rsg>
+#include <AknProgressDialog.h>
+
+
+// Standard Symbian OS construction sequence
+CCSXHDocument* CCSXHDocument::NewL(CEikApplication& aApp)
+    {
+    CCSXHDocument* self = NewLC(aApp);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCSXHDocument* CCSXHDocument::NewLC(CEikApplication& aApp)
+    {
+    CCSXHDocument* self = new (ELeave) CCSXHDocument(aApp);
+    CleanupStack::PushL(self);
+    return self;
+    }
+
+CCSXHDocument::CCSXHDocument(CEikApplication& aApp) : CAknDocument(aApp)
+    {// no implementation required
+    }
+
+CCSXHDocument::~CCSXHDocument()
+    {
+	delete iHelpDataBase;
+    }
+
+CEikAppUi* CCSXHDocument::CreateAppUiL()
+    {
+    // Create the application user interface, and return a pointer to it,
+    // the framework takes ownership of this object. ConstructL of the AppUi
+    // object will be called by the Application Framework
+    iHelpAppUi = new (ELeave) CCSXHAppUi;
+    
+    HBufC* appToc = CCSXHAppUi::GetCoeEnv()->AllocReadResourceLC( R_CSHELP_TOC_APP_HELPS );
+    iHelpDataBase = CCSXHHelpDataBase::NewL(CCSXHAppUi::GetCoeEnv(),AppCaption(), *appToc);
+    CleanupStack::PopAndDestroy( appToc );
+	
+	iDisplayTopic = iHelpDataBase->GetMainTopics();
+	iPrevTopic = NULL;
+	
+	iProgressDialog = NULL;
+    
+    return iHelpAppUi;
+    }
+// --------------------------------------------------------------------------
+// Sets the topic to be displayed next
+// --------------------------------------------------------------------------
+void CCSXHDocument::SetDisplayTopic(CCSXHHelpContentBase* aDisplayTopic)
+	{
+	iDisplayTopic = aDisplayTopic;
+	iPrevTopic = NULL;
+	
+	if(iDisplayTopic == NULL)
+		iDisplayTopic = iHelpDataBase->GetMainTopics();
+	}
+// --------------------------------------------------------------------------
+// Sets the topic to be displayed next and the previous topic
+// The previous topic is needed to highlight the correct item in the listbox
+// --------------------------------------------------------------------------
+void CCSXHDocument::SetDisplayAndPrevTopic(CCSXHHelpContentBase* aDisplayTopic)
+	{
+	iPrevTopic = iDisplayTopic;
+	iDisplayTopic = aDisplayTopic;
+	
+	if(iDisplayTopic == NULL)
+		iDisplayTopic = iHelpDataBase->GetMainTopics();
+	
+	}
+	
+void CCSXHDocument::SendMessageToAppUiL(TInt aCommand)
+	{
+	iHelpAppUi->ProcessCommandL(aCommand);
+	}
+
+// --------------------------------------------------------------------------
+// Sets the context topic as the next topic to be displayed
+// --------------------------------------------------------------------------
+TBool CCSXHDocument::SetContextTopicAsDisplayTopicL(const TDesC8& aContextMessage)
+	{
+	CCSXHHelpContentBase* topic = iHelpDataBase->GetContextTopic(aContextMessage);
+	if(topic)
+		{
+		SetDisplayTopic(topic);	
+		return ETrue;
+		}
+	return EFalse;
+	}
+CCSXHHelpContentBase* CCSXHDocument::GetHtmlTopicForUrlL(const TDesC& url)
+	{
+	return iHelpDataBase->GetHtmlTopicForUrlL(url);
+	}
+
+void CCSXHDocument::InitProgressBarL()
+	{
+
+    iProgressDialog = new(ELeave)CAknProgressDialog(
+                           REINTERPRET_CAST(CEikDialog**,&iProgressDialog));
+    iProgressDialog->PrepareLC(R_CSHELP_SEARCH_PROGRESS_NOTE);
+    
+    CEikProgressInfo* pBar = iProgressDialog->GetProgressInfoL();
+    iTotalKeywordsInResultView = iHelpDataBase->InitGenerateKeywordTOC2ListL(
+    									STATIC_CAST(CCSXHKywdTOC1*,iDisplayTopic));
+    pBar->SetFinalValue(iTotalKeywordsInResultView);
+ 	iIdle = CIdle::NewL(CActive::EPriorityLow);
+    TCallBack callback(CallBack, this);
+    iIdle->Start(callback);
+    iProgressDialog->RunDlgLD(CAknNoteDialog::ENoTone);  
+	}
+	 	
+void CCSXHDocument::FreeProgressBarL()
+	{
+	delete iIdle;
+    iIdle = NULL;
+    if(iProgressDialog)
+    	{
+    	iProgressDialog->ProcessFinishedL();
+		iProgressDialog = NULL;
+    	}
+	}
+		
+TInt CCSXHDocument::CallBack(TAny* aThis)
+    {
+    TInt err(KErrNone);
+    TBool res(EFalse);
+    CCSXHDocument* self = STATIC_CAST(CCSXHDocument*, aThis);
+    TRAP( err, res = self->DoCallBackL() );
+    if(err != KErrNone )
+    	{
+    	TRAP_IGNORE(self->FreeProgressBarL());
+    	}
+    return res;
+    }
+TBool CCSXHDocument::DoCallBackL()
+    {
+    if(!iProgressDialog)
+        {
+        delete iIdle;
+        iIdle = NULL;
+        return EFalse;
+        }
+        
+    CEikProgressInfo* pBar= iProgressDialog->GetProgressInfoL();
+    pBar->SetAndDraw(iHelpDataBase->GetKeywordSearchCount());
+    
+    if(iHelpDataBase->GetKeywordSearchCount() >= iTotalKeywordsInResultView)
+    	{
+    	FreeProgressBarL();
+    	return EFalse;
+    	}
+    
+    return ETrue;    
+    }    
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/src/CSXHGenericContainer.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,383 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHGenericContainer class definition
+*
+*/
+
+
+#include "CSXHGenericContainer.h"
+#include "CSXHGenericView.h"
+#include "CSXHDocument.h"
+#include "CSXHAppUi.h"
+#include "CSXHHelpDataBase.h"
+#include "CSXHGenericTOC1.h"
+#include "CSXHGenericTOC2.h"
+
+#ifdef FF_HELP_TUTORIAL_MERGE
+#include "CSXHHtmlTOC2.h"
+#endif
+
+#include "CsHelp.hrh"
+#include "csxhconstants.h"
+
+#include "CSXHViewIDs.h"
+#include <eikclbd.h>
+#include <aknlists.h>
+#include <featmgr.h>
+#include <AknPriv.hrh>
+
+const TInt KFindNameLength = 40;
+const TInt KComponentCount = 2;     
+
+#ifdef FF_HELP_TUTORIAL_MERGE
+CCSXHGenericContainer* CCSXHGenericContainer::NewL(const TRect& aRect,CCSXHDocument& aDocument,CCSXHGenericView* aView)
+	{
+	CCSXHGenericContainer* self = CCSXHGenericContainer::NewLC(aRect,aDocument,aView);
+    CleanupStack::Pop(self);
+    return self;
+	}
+#else
+CCSXHGenericContainer* CCSXHGenericContainer::NewL(const TRect& aRect,CCSXHDocument& aDocument)
+    {
+    CCSXHGenericContainer* self = CCSXHGenericContainer::NewLC(aRect,aDocument);
+    CleanupStack::Pop(self);
+    return self;
+    }
+#endif
+    
+#ifdef FF_HELP_TUTORIAL_MERGE
+CCSXHGenericContainer* CCSXHGenericContainer::NewLC(const TRect& aRect,CCSXHDocument& aDocument,CCSXHGenericView* aView)
+    {
+    CCSXHGenericContainer* self = new(ELeave) CCSXHGenericContainer(aDocument,aView);
+    CleanupStack::PushL(self);
+    self->ConstructL(aRect);
+    return self;
+    }
+#else
+CCSXHGenericContainer* CCSXHGenericContainer::NewLC(const TRect& aRect,CCSXHDocument& aDocument)
+    {
+    CCSXHGenericContainer* self = new(ELeave) CCSXHGenericContainer(aDocument);
+    CleanupStack::PushL(self);
+    self->ConstructL(aRect);
+    return self;
+    }
+#endif
+
+#ifdef FF_HELP_TUTORIAL_MERGE
+CCSXHGenericContainer::CCSXHGenericContainer(CCSXHDocument& aDocument,CCSXHGenericView* aView) : 
+iDocument(aDocument),iView(aView)
+#else
+CCSXHGenericContainer::CCSXHGenericContainer(CCSXHDocument& aDocument) : iDocument(aDocument)
+#endif
+    {//No implementation required
+    }
+    
+CCSXHGenericContainer::~CCSXHGenericContainer()
+    {
+    delete iListBox;
+    delete iFindPane;
+    }
+    
+void CCSXHGenericContainer::ConstructL(const TRect& aRect)
+    {
+    CreateWindowL();
+
+    CreateAndPopulateListL();
+
+    iListBox->SetListBoxObserver(this); 
+    SetRect(aRect);
+    ActivateL();    
+    }
+// --------------------------------------------------------------------------
+// Does the following
+// 1) Creates and populates the listbox
+// 2) Highlights an item in the listbox
+// 3) Check for MSK
+// --------------------------------------------------------------------------
+void CCSXHGenericContainer::CreateAndPopulateListL()
+    {
+    // First phase construction
+    iListBox = new (ELeave) CAknSingleStyleListBox;
+    iListBox->SetContainerWindowL(*this);
+
+    iListBox->ConstructL(this, 0);
+    iListBox->CreateScrollBarFrameL(ETrue);
+    iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
+                                                CEikScrollBarFrame::EOff,
+                                                CEikScrollBarFrame::EAuto);
+    iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL(ETrue); 
+              
+    CTextListBoxModel* model = iListBox->Model();  // not taking ownership
+    model->SetOwnershipType (ELbmOwnsItemArray);
+    CDesCArray* testArray = STATIC_CAST(CDesCArray*, model->ItemTextArray());
+    
+    CCSXHGenericTOC1* displayTopic = STATIC_CAST(CCSXHGenericTOC1*,iDocument.GetDisplayTopic());
+    
+    displayTopic->FillChildDataL(testArray);
+    
+    //Find panel Begin
+    CAknSearchField::TSearchFieldStyle flags(CAknSearchField::ESearch);
+    iFindPane = CAknSearchField::NewL(*this, flags, 
+                                       NULL,KFindNameLength);
+
+    STATIC_CAST(CAknFilteredTextListBoxModel*, iListBox->Model())
+        ->CreateFilterL(iListBox, iFindPane);
+    
+    STATIC_CAST(CAknFilteredTextListBoxModel*, iListBox->Model())
+            ->Filter()->HandleOfferkeyEventL();  
+	//Corrections to TSW Error:  KMAI-6WNACA with New UI CR: EVIA-6XAJ46            
+    if (FeatureManager::FeatureSupported(KFeatureIdJapanese) &&
+        (User::Language() == ELangJapanese))
+        {        
+        iFindPane->Editor().SetAknEditorInputMode(EAknEditorHiraganaKanjiInputMode);
+        }
+    else
+    	{
+    	iFindPane->Editor().SetAknEditorCurrentInputMode(EAknEditorTextInputMode);
+    	}
+
+    HightLightItemL();    
+    }
+    
+void CCSXHGenericContainer::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aListBoxEvent)
+    {
+    switch ( aListBoxEvent )
+        {
+        case MEikListBoxObserver::EEventEnterKeyPressed:
+        case MEikListBoxObserver::EEventItemSingleClicked:
+#ifdef FF_HELP_TUTORIAL_MERGE
+  	        if(IsShowTutorialItemSelectedL())
+	        	{
+                CCSXHAppUi::GetInstance()->CallTutorialAiwProviderL();
+	        	}
+	        else
+
+#endif	        
+	        	{
+	        	iDocument.SendMessageToAppUiL( ECSXHOpenItemPropagated );
+	        	}	        	   
+
+            break;
+        default:
+            break;// do nothing with the rest of the events
+        }       
+    }
+    
+void CCSXHGenericContainer::SizeChanged()
+    {
+    iListBox->SetRect(Rect());
+    AknFind::HandleFixedFindSizeChanged(this, iListBox, iFindPane);
+    }
+    
+void CCSXHGenericContainer::FocusChanged(TDrawNow aDrawNow)
+    {
+    if (iListBox)
+        {
+        iListBox->SetFocus(IsFocused(), aDrawNow);
+        }
+    if ( iFindPane )
+        {
+        iFindPane->SetFocus( IsFocused(), aDrawNow );
+        }
+    }
+        
+TInt CCSXHGenericContainer::CountComponentControls() const
+    {
+    return KComponentCount;
+    }
+    
+CCoeControl* CCSXHGenericContainer::ComponentControl(TInt aIndex) const
+    {
+    switch (aIndex)
+        {
+        case 0:
+            return iListBox;
+        case 1:
+            return iFindPane;
+        default:
+            return NULL;
+        }
+    }
+        
+void CCSXHGenericContainer::Draw(const TRect& aRect) const
+    {
+    CWindowGc& gc = SystemGc();
+    gc.Clear(aRect);
+    }
+    
+TKeyResponse CCSXHGenericContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
+    {
+    TKeyResponse result(EKeyWasNotConsumed);
+    
+    TBool needRefresh;
+    result = AknFind::HandleFindOfferKeyEventL(aKeyEvent, aType,
+                        this, iListBox, iFindPane, EFalse, needRefresh);
+    CheckForMSK();              
+    if (result == EKeyWasNotConsumed)
+        {
+        result = iListBox->OfferKeyEventL (aKeyEvent, aType);
+        }
+    return result; 
+    }
+    
+void CCSXHGenericContainer::HandleResourceChange(TInt aType)
+    {
+    CCSXHAppUi::GetInstance()->PropagateResourceChange(aType);
+
+    if (KAknSplitInputEnabled == aType || KAknSplitInputDisabled == aType)
+        {
+    // Bug fixing, SetFocus can't be called with these aType, it will lead to infinite loop in fep.
+        return;
+        }
+    
+    if ( IsFocused() )
+        {
+        SetFocus( IsFocused(), EDrawNow );
+        }
+
+    }
+    
+void CCSXHGenericContainer::HandleResourceChangeImpl(TInt aType)
+    {
+    if (aType == KEikDynamicLayoutVariantSwitch)
+        {
+        iListBox->HandleResourceChange(aType);
+        TRect mainRect; 
+        SizeChanged();
+        TRect statusPaneRect;
+        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane,mainRect);
+        SetRect(mainRect);
+        DrawNow();
+        }
+    else
+        {
+        CCoeControl::HandleResourceChange(aType);   
+        }
+    }
+// --------------------------------------------------------------------------
+// Sets the next topic to be displayed based on the selected item
+// --------------------------------------------------------------------------    
+void CCSXHGenericContainer::SetDisplayTopicL()
+    {
+    TInt index = iListBox->CurrentItemIndex();
+    if(KErrNotFound == index)
+        return;
+        
+    TBuf<KMaxFileName> selectedTOC2 = iListBox->Model()->ItemText(index);
+    selectedTOC2 = selectedTOC2.Mid(1);
+    
+    CCSXHGenericTOC1* displayTopic = STATIC_CAST(CCSXHGenericTOC1*,iDocument.GetDisplayTopic());
+    if( displayTopic->GetChildL(selectedTOC2) )
+        {
+    	iDocument.SetDisplayAndPrevTopic(displayTopic->GetChildL(selectedTOC2));
+        }
+    }
+
+TInt CCSXHGenericContainer::GetNumberOfListItems()
+    {
+    return iListBox->Model()->NumberOfItems();
+    }
+    
+void CCSXHGenericContainer::SetCurrentView(CCSXHGenericView* aView)
+    {
+    iView = aView;
+    }
+    
+void CCSXHGenericContainer::HightLightItemL()    
+    {
+    CCSXHHelpContentBase* prevTopic = iDocument.GetPrevTopic();    
+    if(!prevTopic)
+        return;
+        
+    TInt visibleItemcount = GetNumberOfListItems();
+    for (TInt index = 0; index < visibleItemcount ; ++index )
+        {
+        TBuf<KMaxFileName> txt = iListBox->Model()->ItemText(index);
+        txt = txt.Mid(1);//remove the '/t'
+        if(txt.Compare(prevTopic->GetName()) == 0)
+            {
+            if(iListBox->CurrentItemIndex() != index)
+                iListBox->SetCurrentItemIndex(index);
+            return;
+            }
+        }
+    }
+    
+void CCSXHGenericContainer::CheckForMSK()   
+    {
+#ifndef __SERIES60_30__ 
+    if(AknLayoutUtils::MSKEnabled())
+        {   
+        if(iListBox->Model()->NumberOfItems())
+            {
+            iView->SetMiddleSoftKey(ETrue);         
+            }
+        else
+            {
+            iView->SetMiddleSoftKey(EFalse);                
+            }
+        }
+#endif      
+    }
+      
+#ifdef FF_HELP_TUTORIAL_MERGE
+// --------------------------------------------------------------------------
+// CCSXHAppUi::IsShowTutorialItemSelectedL
+// If the selected item is a tutorial item.
+// --------------------------------------------------------------------------
+TBool CCSXHGenericContainer::IsShowTutorialItemSelectedL()
+    {
+    TBool bShowTutorial = EFalse;
+    //TODO:
+    // if keyword page supported tutorial, the comments should be opened
+    if( 0 != GetNumberOfListItems /*&&  KCSXHKywdToc2ViewID != iView->Id() */)
+        {
+        TInt index = iListBox->CurrentItemIndex();
+        if(KErrNotFound == index)
+            return bShowTutorial;
+        //Get Next View
+        TBuf<KMaxFileName> selectedTOC2 = iListBox->Model()->ItemText(index);
+
+        selectedTOC2 = selectedTOC2.Mid(1);
+        CCSXHGenericTOC1* displayTopic = STATIC_CAST(CCSXHGenericTOC1*,
+                                               iDocument.GetDisplayTopic());
+        TUid NextViewId = displayTopic->GetChildL(selectedTOC2)->GetViewID();
+
+        //Check Tutorial is present for Application topic [TOC2]
+        if(NextViewId == KCSXHHtmlTopicViewID)
+            {
+            CCSXHHtmlTOC2* HTMLTOC2Ptr = STATIC_CAST(CCSXHHtmlTOC2*,
+                                      displayTopic->GetChildL(selectedTOC2));
+            TFileName filename;
+            HTMLTOC2Ptr->GetHtmlUrlL( filename );
+            if( KErrNotFound != filename.Find( KTutorialFileExtn ))
+                {
+                bShowTutorial = ETrue;
+                TCoeHelpContext helpContext;
+                HTMLTOC2Ptr->GetHelpContext(helpContext);
+                CCSXHAppUi::GetInstance()->SetHelpContext( helpContext );
+                }
+            }
+        }
+    return bShowTutorial;
+    }
+
+#endif // FF_HELP_TUTORIAL_MERGE
+
+
+void CCSXHGenericContainer::MakeVisible(TBool aVisible)
+    {
+    CCoeControl::MakeVisible(aVisible);
+    iListBox->ScrollBarFrame()->ComponentControl(0)->MakeVisible(aVisible);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/src/CSXHGenericView.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,268 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHGenericView class definition
+*
+*/
+
+
+#include "CSXHGenericView.h"
+#include "CSXHGenericContainer.h"
+#include "CSXHAppUi.h"
+#include "CSXHDocument.h"
+#include <cshelp.rsg>
+#include "CsHelp.hrh"
+
+#include "CSXHHelpContentBase.h"
+#include "CSXHViewIDs.h"
+#include "CSXHHelpDataBase.h"
+
+#include <akntitle.h> 
+#include <coemain.h>
+#include <eikmenup.h>
+#include <eikbtgpc.h>
+
+#ifdef FF_HELP_TUTORIAL_MERGE
+
+#include <AiwMenu.h>
+#include <AiwCommon.h>
+#include <AiwServiceHandler.h>
+#include <AknGlobalNote.h>
+
+#endif // FF_HELP_TUTORIAL_MERGE
+
+CCSXHGenericView* CCSXHGenericView::NewL(const TUid& aUid, 
+                                         const TInt& aFlags)
+    {
+    CCSXHGenericView* self = new(ELeave) CCSXHGenericView(aUid,aFlags);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(self);
+    return self;
+    }
+    
+CCSXHGenericView::CCSXHGenericView(const TUid& aUid, const TInt& aFlags)
+            :iResetContainerInActivate(EFalse),iUid(aUid),iAppFlags(aFlags)
+    {//No Implementation required
+    }
+    
+void CCSXHGenericView::ConstructL() 
+    {
+    BaseConstructL(iAppFlags);
+
+    }
+    
+CCSXHGenericView::~CCSXHGenericView()
+    {
+    if(iContainer)
+    	{
+    	AppUi()->RemoveFromStack(iContainer); 
+    	delete iContainer;
+    	}
+    }
+    
+TUid CCSXHGenericView::Id() const
+    {
+    return iUid;
+    }
+
+// --------------------------------
+// Message Handler
+// --------------------------------    
+void CCSXHGenericView::HandleCommandL(TInt aCommand)    
+    {
+    switch(aCommand)
+        {           
+        case EAknSoftkeyBack:
+            {
+            CCSXHDocument* doc = static_cast<CCSXHDocument*>(AppUi()->Document());
+            if(iUid == KCSXHToc2ViewID)
+            	{
+                doc->SetDisplayAndPrevTopic(doc->GetHelpDataBase()->GetMainTopics());
+            	}
+            else if(iUid == KCSXHKywdToc2ViewID)
+            	{
+                doc->SetDisplayAndPrevTopic(doc->GetHelpDataBase()->GetKywdTopics());
+            	}
+            else if ( iUid == KCSXHToc1AppHelpsViewID )
+            	{
+                doc->SetDisplayAndPrevTopic( doc->GetHelpDataBase()->GetMainTopics() );
+            	}
+            else if ( iUid == KCSXHToc2AppHelpsViewID )
+            	{
+                doc->SetDisplayAndPrevTopic( doc->GetHelpDataBase()->GetAppHelpsTopics() );
+            	}
+            else if ( iUid == KCSXHKywdToc1ViewID )
+            	{
+                doc->SetDisplayAndPrevTopic( doc->GetHelpDataBase()->GetMainTopics() );
+            	}
+            	
+            
+            AppUi()->HandleCommandL(ECSXHOpenItem); 
+            }
+            break;
+        case ECSXHOpenItemPropagated: //Will be called for AppUi    
+            iContainer->SetDisplayTopicL();
+            break;
+        case ECSXHTOC1ListView:
+            {
+            CCSXHDocument* doc = static_cast<CCSXHDocument*>(AppUi()->Document());              
+            doc->SetDisplayAndPrevTopic(doc->GetHelpDataBase()->GetMainTopics());
+            AppUi()->HandleCommandL(ECSXHOpenItem);
+            }
+            break;      
+        case ECSXHOpenItem:
+        case ECSXHOpenTopicText:    
+#ifdef FF_HELP_TUTORIAL_MERGE
+
+            if(iContainer->IsShowTutorialItemSelectedL())
+                {
+                if(CCSXHAppUi::GetInstance()->IsApplicationPresentInTutorialL())
+                    {
+                    CCSXHAppUi::GetInstance()->CallTutorialAiwProviderL();
+                    }
+                else
+                    {
+                    HBufC* ErrorMessage = iCoeEnv->AllocReadResourceLC(
+                                                        R_TYPE_NO_HELP_TOPICS);
+                    CAknGlobalNote* note = CAknGlobalNote::NewLC();
+                    note->ShowNoteL(EAknGlobalInformationNote, *ErrorMessage);
+
+                    CleanupStack::PopAndDestroy(note);
+                    CleanupStack::PopAndDestroy(ErrorMessage);
+                    }
+                }
+            else
+
+#endif // FF_HELP_TUTORIAL_MERGE
+	        	{        	
+	            iContainer->SetDisplayTopicL();
+	            AppUi()->HandleCommandL(aCommand);  
+	            }
+            break; 
+        default:
+            AppUi()->HandleCommandL(aCommand);  
+            break;              
+        }
+    }
+// --------------------------------------------------------------------------
+// Handler for view activation. If required the container object will be 
+// recreated. The recreation can be due to 1) Resetting the search pane
+// 2) Changing the selection of the items in the list box 3) Repopulating the
+// contents of the list box
+// --------------------------------------------------------------------------
+void CCSXHGenericView::DoActivateL(const TVwsViewId& /*aPrevViewId*/,TUid,const TDesC8& )
+    {
+    CCSXHDocument* doc = static_cast<CCSXHDocument*>(AppUi()->Document());
+    if(iResetContainerInActivate)
+        {
+        delete iContainer;
+        iContainer = NULL;
+        iResetContainerInActivate = EFalse;
+        }
+    if(!iContainer)
+    	{
+   	    if(iUid == KCSXHKywdToc2ViewID)
+			doc->InitProgressBarL();
+   	    
+#ifdef FF_HELP_TUTORIAL_MERGE
+        iContainer = CCSXHGenericContainer::NewL(ClientRect(),*doc,this);
+#else // !FF_HELP_TUTORIAL_MERGE
+        iContainer = CCSXHGenericContainer::NewL(ClientRect(),*doc);
+#endif // FF_HELP_TUTORIAL_MERGE
+
+        /*if(iUid == KCSXHKywdToc2ViewID)
+			doc->FreeProgressBarL();*/
+    	}
+    iContainer->HightLightItemL();	
+    iContainer->MakeVisible(ETrue);
+    iContainer->DrawNow();
+    iContainer->SetMopParent(this);
+    //iContainer->SetRect(ClientRect());   
+    iContainer->SetCurrentView(this);
+    AppUi()->AddToStackL(*this, iContainer);
+    
+    if(iUid == KCSXHToc1ViewID ||
+       iUid == KCSXHKywdToc1ViewID)
+        {
+        doc->GetHelpDataBase()->ClearAllTOC1Contents();
+        doc->ClearPrevTopic();
+        }
+    
+    iContainer->CheckForMSK();
+    
+    //Set the title of the view
+    CEikStatusPane* sp = StatusPane();
+    CAknTitlePane* title = STATIC_CAST(CAknTitlePane*, 
+    sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle)));
+    title->SetTextL(doc->GetDisplayTopic()->GetName());
+    }
+    
+void CCSXHGenericView::DoDeactivate()
+    {
+    if(iContainer)
+        {
+        iContainer->MakeVisible(EFalse);
+        AppUi()->RemoveFromStack(iContainer);
+        }
+    }
+    
+void CCSXHGenericView::ResetContainer()
+    {
+    iResetContainerInActivate = ETrue;
+    }
+// --------------------------------------------------------------------------
+// Dynamically changing the items in the Options Menu
+// --------------------------------------------------------------------------
+
+void CCSXHGenericView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
+    {    
+    if ( aResourceId == R_CSXH_MENU_TOPICLIST &&
+         iContainer->GetNumberOfListItems()== 0 )
+        {
+        aMenuPane->DeleteMenuItem(ECSXHOpenTopicText);
+        }
+        
+    if ( aResourceId == R_CSXH_MENU_KYWDTOC1LIST &&
+         iContainer->GetNumberOfListItems()== 0 )
+        {
+        aMenuPane->DeleteMenuItem(ECSXHOpenTopicText);
+        }
+        
+    if ( aResourceId == R_CSXH_MENU &&
+         iContainer->GetNumberOfListItems()== 0 )
+        {
+        aMenuPane->DeleteMenuItem(ECSXHOpenItem);
+        }
+        
+    if ( aResourceId == R_CSXH_MENU_KYWDTOC2LIST &&
+         iContainer->GetNumberOfListItems()== 0 )
+        {
+        aMenuPane->DeleteMenuItem(ECSXHOpenTopicText);
+        }
+    }    
+// --------------------------------------------------------------------------
+// MSK Handler Handling 
+// --------------------------------------------------------------------------
+void CCSXHGenericView::SetMiddleSoftKey(TBool aValue)
+    {    
+    Cba()->MakeCommandVisible(ECSXHOpenTopicText,aValue);
+    Cba()->DrawDeferred();  
+    }
+void CCSXHGenericView::ResourceChangeHdl(TInt aType)
+    {
+    if(iContainer)
+        iContainer->HandleResourceChangeImpl(aType);
+    }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/src/CSXHHtmlTopicContainer.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,703 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHHtmlTopicContainer class definition
+*
+*/
+
+
+#include "CSXHHtmlTOC2.h"
+#include "CSXHHtmlTOC1.h"
+#include "CSXHDocument.h"
+#include "CSXHAppUi.h"
+#include "CSXHHtmlTopicView.h"
+#include "CSXHViewIDs.h"
+#include <cshelp.rsg>
+#include "CsHelp.hrh"
+#include "CSXHHtmlTopicContainer.h"
+#include "AppLauncherForCSXH.h"
+#include "csxhconstants.h"
+
+
+#include <brctlinterface.h>
+#include <browserlauncher.h>
+#include <brctldefs.h>
+
+#include <coemain.h>
+#include <AknUtils.h>
+#include <akntitle.h>
+#include <aknnotewrappers.h> 
+#include <AknGlobalNote.h>
+#include <apmrec.h>
+#include <apgcli.h>
+#include <zipfile.h> 
+#include <utf.h>
+#include <charconv.h>
+#include <bautils.h>
+
+_LIT(KContentType,"text/html");
+_LIT(KCsstextToRemovePathinfo,"<style>\n #APP_LAUNCH_LINK{display:none}\n</style>");
+
+
+CBlankContainer::CBlankContainer()
+    {
+    }
+
+CBlankContainer::~CBlankContainer()
+    {
+    }
+    
+
+void CBlankContainer::Draw( const TRect& aRect ) const
+    {
+    CWindowGc& gc = SystemGc();
+    TRect rect = Rect();
+    gc.Clear(rect);    
+    }
+
+
+// Standard construction sequence
+CCSXHHtmlTopicContainer* CCSXHHtmlTopicContainer::NewL(const TRect& aRect,CCSXHDocument 
+&aDocument,CCSXHHtmlTopicView *aView)
+    {
+    CCSXHHtmlTopicContainer* self = CCSXHHtmlTopicContainer::NewLC(aRect,aDocument,aView);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CCSXHHtmlTopicContainer* CCSXHHtmlTopicContainer::NewLC(const TRect& aRect,CCSXHDocument 
+&aDocument,CCSXHHtmlTopicView *aView)
+    {
+    CCSXHHtmlTopicContainer* self = new (ELeave) CCSXHHtmlTopicContainer(aDocument,aView);
+    CleanupStack::PushL(self);
+    self->ConstructL(aRect);
+    return self;
+    }
+
+CCSXHHtmlTopicContainer::CCSXHHtmlTopicContainer(CCSXHDocument &aDocument,CCSXHHtmlTopicView *aView)
+        : iTopic(NULL),iDocument(aDocument),iView(aView)
+        ,iAppLauncher(NULL), iLoadHtml(EFalse), iPrevPageCount(0), iBack(EFalse)
+        ,iContentLoading(ENoContent)
+
+    {
+    // no implementation required
+    }
+
+CCSXHHtmlTopicContainer::~CCSXHHtmlTopicContainer()
+    {
+    if(iBrCtrl)
+        {
+        iBrCtrl->SetFocus(EFalse);
+        iBrCtrl->RemoveLoadEventObserver(this);
+        delete iBrCtrl;
+        iBrLibrary.Close();
+        }
+
+    delete iAppLauncher;
+  
+    delete iBlankContainer;
+
+    }
+
+void CCSXHHtmlTopicContainer::ConstructL( const TRect& aRect )
+    {
+    // Create a window for this application view
+    CreateWindowL();
+
+    // Set the windows size
+    SetRect(aRect);
+    if( KErrNone != iBrLibrary.Load( _L( "BrowserEngine.dll" ) ) )
+    	{
+       	HBufC* ErrorMessage = CCSXHAppUi::GetCoeEnv()->AllocReadResourceLC(
+    				R_CSHELP_RETRIEVE_NO_MEMORY_TEXT );      
+    	CAknGlobalNote* note = CAknGlobalNote::NewLC();
+    	note->ShowNoteL( EAknGlobalInformationNote, *ErrorMessage );
+    	CleanupStack::PopAndDestroy( note ); 
+    	CleanupStack::PopAndDestroy( ErrorMessage ); 
+    	iDocument.SetDisplayTopic( iDocument.GetPrevTopic() );
+		CCSXHAppUi::GetInstance()->HandleCommandL( ECSXHOpenItem );
+		User::Leave( KErrNoMemory );
+    	}     
+
+#ifdef __WINS__    
+    TLibraryFunction result = iBrLibrary.Lookup( 10 ); 
+#else
+    TLibraryFunction result = iBrLibrary.Lookup( 1 );   
+#endif    
+		
+	FuncPtr_CreateBrowserControlL fptr  = ( FuncPtr_CreateBrowserControlL )result;
+    
+    iBrCtrl = ( *fptr )(
+                    this,aRect,
+                    TBrCtlDefs::ECapabilityDisplayScrollBar|
+                    TBrCtlDefs::ECapabilityClientResolveEmbeddedURL|
+#ifndef __SERIES60_30__                                 
+                    TBrCtlDefs::ECapabilityCursorNavigation|
+                    TBrCtlDefs::ECapabilityWebKitLite|
+#endif                                  
+                    TBrCtlDefs::ECapabilityClientNotifyURL,
+                    TBrCtlDefs::ECommandIdBase, this, this, NULL, this
+                    );
+    iBrCtrl->SetBrowserSettingL( TBrCtlDefs::ESettingsCSSFetchEnabled, 1 );    
+    iBrCtrl->AddLoadEventObserverL( this );   
+    
+    
+    SetSelectedFontSizeL( iView->GetCurrentFontSize() );
+    iBrCtrl->MakeVisible( ETrue );
+    
+    iBlankContainer = new ( ELeave ) CBlankContainer();
+    iBlankContainer->SetRect( Rect() );
+    
+    ShowBrowser();
+    
+    ActivateL();
+    }
+
+void CCSXHHtmlTopicContainer::Draw(const TRect& /*aRect*/) const
+    {
+    CWindowGc& gc = SystemGc();
+    TRect rect = Rect();
+    gc.Clear(rect);    
+    }
+void CCSXHHtmlTopicContainer::SetAndLoadInitialTopicL(CCSXHHtmlTOC2* aTopic)
+	{
+	iTopic = aTopic;
+	TRAPD(err,LoadHtmlL());
+    if( KErrNone != err )
+	    {
+	    HBufC* ErrorMessage = CCSXHAppUi::GetCoeEnv()->AllocReadResourceLC(
+    				R_CSHELP_RETRIEVE_NO_MEMORY_TEXT);      
+    	CAknGlobalNote* note = CAknGlobalNote::NewLC();
+    	note->ShowNoteL(EAknGlobalInformationNote, *ErrorMessage);
+    	CleanupStack::PopAndDestroy(note); 
+    	CleanupStack::PopAndDestroy(ErrorMessage); 
+    	iDocument.SetDisplayTopic(iDocument.GetPrevTopic());
+		CCSXHAppUi::GetInstance()->HandleCommandL(ECSXHOpenItem);
+		User::Leave(KErrNoMemory);	    
+	    }
+ 
+	}
+
+void CCSXHHtmlTopicContainer::LoadHtmlL()
+    {
+    iBrCtrl->MakeVisible( EFalse ); 
+    SetContentLoadState( EContentLoading );
+    HBufC8 *htmlBuffer = STATIC_CAST(HBufC8*,iTopic->GetTopicContentL());
+    if(htmlBuffer)
+        {
+        CleanupStack::PushL(htmlBuffer);
+        TUid uid;
+        uid.iUid = KCharacterSetIdentifierIso88591;
+        _LIT8(KContentType,"text/html");
+        TDataType dataType(KContentType());
+        iTopic->GetHtmlUrlL(iUrlNoAnchors);
+        iBack = EFalse;
+        ClearHistoryL();
+        iLoadHtml = ETrue;
+        
+        //RUNTIME
+        //if it is context sensitive launch, Add CSS content to remove
+        //Application launch link.
+        if(iView->GetViewType() == CCSXHHtmlTopicView::EContextHtmlView)
+	        {
+	        HBufC8* ContextHtmlbuffer = HBufC8::NewLC(htmlBuffer->Size() + 100);
+	        TPtr8 bufferPtr = ContextHtmlbuffer->Des();
+	        bufferPtr.Copy(KCsstextToRemovePathinfo);
+	        bufferPtr.Append(htmlBuffer->Des());
+	        iBrCtrl->LoadDataL(iUrlNoAnchors,*ContextHtmlbuffer,dataType,uid);	
+	    	CleanupStack::PopAndDestroy(ContextHtmlbuffer);    	
+	        }
+        else
+	        {
+	        iBrCtrl->LoadDataL(iUrlNoAnchors,*htmlBuffer,dataType,uid);	
+	        }
+        CleanupStack::PopAndDestroy(htmlBuffer);
+        }
+    else
+        {
+        iTopic->GetHtmlUrlL(iUrlNoAnchors);
+        iBrCtrl->LoadUrlL(iUrlNoAnchors);
+        }
+    CheckForMSK();  
+    }
+
+TKeyResponse CCSXHHtmlTopicContainer::OfferKeyEventL(const TKeyEvent &  
+aKeyEvent,TEventCode  aType )
+    {
+    TKeyResponse result(EKeyWasNotConsumed);
+    
+    if ((aKeyEvent.iCode == EKeyEnter )&& (aType == EEventKey)
+    	&& (IsHyperLinkFocused()))
+        { 
+        HandleCommandOpenHyperLinkL();
+        CheckForMSK();
+        return EKeyWasConsumed; 
+        }
+    
+    if(iBrCtrl)
+        {
+        result = iBrCtrl->OfferKeyEventL(aKeyEvent, aType);        
+		CheckForMSK();
+		}       
+    return result;  
+    }
+
+TInt CCSXHHtmlTopicContainer::CountComponentControls() const
+    {
+    return 2; 
+    }
+
+CCoeControl* CCSXHHtmlTopicContainer::ComponentControl(TInt aIndex) const
+    {
+    switch (aIndex)
+        {
+        case 0:
+            return iBottomControl;
+        case 1:
+            return iTopControl;
+        default:
+            return NULL;
+        }
+    }
+    
+void CCSXHHtmlTopicContainer::HandleResourceChange(TInt aType)
+    {
+    CCSXHAppUi::GetInstance()->PropagateResourceChange(aType); 
+    }
+void CCSXHHtmlTopicContainer::HandleResourceChangeImpl(TInt aType)
+    {
+    if (aType == KEikDynamicLayoutVariantSwitch)
+        {
+        iBrCtrl->HandleResourceChange(aType);
+        TRect mainRect; 
+        TRect statusPaneRect;
+        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane,mainRect);
+        SetRect(mainRect);
+            if(iBrCtrl)
+#ifndef __SERIES60_30__             
+                iBrCtrl->SetRect(Rect());
+#else                       
+                iBrCtrl->SetRect(mainRect);
+#endif              
+        DrawNow();
+        }
+    else
+        {
+        CCoeControl::HandleResourceChange(aType);   
+        }
+    }
+
+void CCSXHHtmlTopicContainer::SizeChanged()
+    {
+#ifndef __SERIES60_30__ 
+    if( iBrCtrl )
+        {
+        if ( iContentLoading != EContentLoading )
+            {
+            iBlankContainer->SetRect( Rect() );
+            iBrCtrl->SetRect( Rect() );
+            iBrCtrl->MakeVisible( ETrue );
+            }
+        else
+            {
+            //Update the title bar
+            CEikStatusPane* sp = CCSXHAppUi::GetInstance()->StatusPane();
+            CAknTitlePane* titlePane = NULL;
+            TRAPD( err, titlePane = STATIC_CAST(CAknTitlePane*,
+                    sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ) );
+            if ( KErrNone == err )
+                {
+                //If can't set Null text to title, no other good way to do further, 
+                //so just ignore this leave
+                TRAP_IGNORE( titlePane->SetTextL( KNullDesC ) );
+                }
+            iBlankContainer->SetRect( Rect() );
+            iBrCtrl->SetRect( Rect() );            
+            }
+        }
+#endif  
+    }
+
+void CCSXHHtmlTopicContainer::HandleCommandBackL()
+    {
+    iBrCtrl->HandleCommandL(TBrCtlDefs::ECommandIdBase + TBrCtlDefs::ECommandBack);
+    }
+ 
+
+TBool CCSXHHtmlTopicContainer::IsPrevPageAvbl()
+    {
+    if (iPrevPageCount > 0)
+      	{
+      	return ETrue;
+      	}
+     else
+      	{
+      	return EFalse;
+      	}
+    } 
+
+
+
+void CCSXHHtmlTopicContainer::ClearHistoryL()
+    {
+    iBrCtrl->HandleCommandL(TBrCtlDefs::ECommandIdBase + TBrCtlDefs::ECommandClearHistory);
+    iPrevPageCount = 0;
+    }
+ 
+TBool CCSXHHtmlTopicContainer::ResolveEmbeddedLinkL(const TDesC& /*aEmbeddedUrl*/,
+                                           const TDesC& /*aCurrentUrl*/,
+                                           TBrCtlLoadContentType /*aLoadContentType*/, 
+                                           MBrCtlLinkContent& /*aEmbeddedLinkContent*/)
+    {
+    return EFalse;
+    }
+// --------------------------------------------------------------------------
+// Handling for
+// 1) Compressed HTML content
+// 2) Application Launch Links
+// 3) External Hyperlinks
+// --------------------------------------------------------------------------
+TBool CCSXHHtmlTopicContainer::ResolveLinkL(const TDesC& aUrl, const TDesC& aCurrentUrl,
+                                   MBrCtlLinkContent& aBrCtlLinkContent)
+    {
+#ifdef FF_HELP_TUTORIAL_MERGE
+    if( KErrNotFound != aUrl.Find( KTutorialFileExtn ))
+        {
+        iView->LaunchTutorial();
+        return ETrue;
+        }
+#endif // FF_HELP_TUTORIAL_MERGE
+    if(NULL == iAppLauncher)
+		{
+		iAppLauncher = AppLauncherForCSXH::NewL();	
+		}
+        //Handling for application launch.
+    if(iAppLauncher->LaunchAppL(aUrl,aCurrentUrl))
+        return ETrue;//Link is resolved locally.
+        
+    if(CheckForExternalLinkL(aUrl))     
+        return ETrue;//Link is resolved locally.
+    
+    //Remove the Anchor, if any     
+    TInt DotPos = aUrl.LocateReverseF('.');
+    TInt HashPos = aUrl.LocateReverseF('#');
+    if(KErrNotFound != HashPos && HashPos > DotPos )
+        {
+        //Direct assignment does not work
+        iUrlNoAnchors.Copy(KEmptyString);
+        iUrlNoAnchors.Append(aUrl.Mid(0,HashPos));
+        }
+    else
+        {
+        //Direct assignment does not work
+        iUrlNoAnchors.Copy(KEmptyString);
+        iUrlNoAnchors.Append(aUrl);
+        }   
+    
+    HBufC8 *htmlBuffer = CCSXHHtmlTOC2::GetContentsFromUrlL(iUrlNoAnchors,CCSXHAppUi::GetCoeEnv(),iFeatureControl);
+    if(htmlBuffer)
+        {
+        TPtrC p(NULL,0);
+        aBrCtlLinkContent.HandleResolveComplete(KContentType,p,htmlBuffer);
+        delete htmlBuffer;
+        iLoadHtml = EFalse;
+        if (iBack)
+        	{
+        	iPrevPageCount--;
+        	iBack = EFalse;
+        	}
+        else
+        	{
+            iPrevPageCount++;
+        	}
+
+        return ETrue;//Link is resolved locally.    
+        }
+        
+    return  EFalse;
+    }
+
+void CCSXHHtmlTopicContainer::CancelFetchL()
+    {
+    if (iBrCtrl)
+        {
+        iBrCtrl->HandleCommandL(
+        	    		(TInt)TBrCtlDefs::ECommandCancelFetch + (TInt)TBrCtlDefs::ECommandIdBase ); 
+        }
+    }
+
+void CCSXHHtmlTopicContainer::CancelAll()
+    {
+
+    }
+
+
+void CCSXHHtmlTopicContainer::HandleResolveComplete(const TDesC& /*aContentType*/,
+                                           const TDesC& /*aCharset*/,
+                                           const HBufC8* /*aContentBuf*/)
+    {
+
+    }
+
+void CCSXHHtmlTopicContainer::HandleResolveError(TInt /*aError*/)
+    {
+    
+    }
+void CCSXHHtmlTopicContainer::RefreshL(CCSXHHtmlTOC2 *aTopic)
+    {
+  	SetAndLoadInitialTopicL(aTopic);
+    }
+
+// --------------------------------------------------------------------------
+// This callback function is used for the following
+// 1) When an HTML page is loaded, this callback function will be called. If 
+// this callback is invoked for hyperlink navigation, then the display topic
+// has to be updated. For example, the Application Topics option menu is
+// dependent on the dipslay topic.
+// 2) Updation of the softkey from Options-Close to Options-Back (& Vice-Versa)
+// in the context view as a result of hyperlink traveral
+// --------------------------------------------------------------------------
+void CCSXHHtmlTopicContainer::HandleBrowserLoadEventL(TBrCtlDefs::TBrCtlLoadEvent aLoadEvent, 
+                                    TUint /*aSize*/, TUint16 /*aTransactionId*/)
+    {
+    if(aLoadEvent == TBrCtlDefs::EEventLoadFinished)
+        {
+        ShowBrowser();
+        SetContentLoadState( EContentLoadFinished );
+        if ( IsVisible() )
+             {
+               HBufC* title = iBrCtrl->PageInfoLC(TBrCtlDefs::EPageInfoTitle);
+               if(!title)
+                   {
+                   CleanupStack::PopAndDestroy(title);
+                   return;
+                   }
+               
+               //Update the title bar
+               CEikStatusPane* sp = CCSXHAppUi::GetInstance()->StatusPane();
+               CAknTitlePane* titlePane = STATIC_CAST(CAknTitlePane*, 
+               sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle)));
+               titlePane->SetTextL(*title);
+               CleanupStack::PopAndDestroy(title);
+             }
+        
+        //For the context sensitive view, the softkey texts need to be changed.
+        //add label iLoadHtml for ESNN-7N9CLN.If the html is opened by 
+        //loadHtmlL, the iLoadHtml will be set to ETrue, which 
+        //can guarantee the RSK keep as "CLOSE" when context is sensitive.
+        if ((!iLoadHtml) && (iView->GetViewType() == CCSXHHtmlTopicView::EContextHtmlView))
+        {  
+            iView->SetViewTypeL(IsPrevHtmlPageAvblL() ? 
+                    CCSXHHtmlTopicView::EHtmlView : CCSXHHtmlTopicView::EContextHtmlView);
+        }
+        
+        //TSW Error:TKOI-74KE89: Help crashes when closing after viewing a link topic
+        //When user presses back keys very quickly, TOC2 objects use to destroy and 
+        //then browser call back function triggers which leads to crash. This check 
+        //will avoid crash.
+        TUid viewId = iDocument.GetDisplayTopic()->GetViewID();
+		if (viewId == KCSXHToc1ViewID || viewId == KCSXHKywdToc1ViewID
+			|| viewId == KCSXHToc2ViewID || viewId == KCSXHKywdToc2ViewID
+			|| viewId == KCSXHToc1AppHelpsViewID || viewId == KCSXHToc2AppHelpsViewID)
+			{
+			return;
+			}
+		
+        //When user clicks on Application Topics, application topics 
+        //corresponding to the topic being displayed has to be opened
+        //Hence update the Display topic information if required.
+        
+        //Check if this event is triggered for the first load after construction
+        TFileName url;
+        iTopic->GetHtmlUrlL(url);
+        if(url.Compare(iUrlNoAnchors) == 0)
+        	{
+        	iDocument.SetDisplayTopic(iTopic);
+        	iNewTopic = NULL;
+        	//Move the code from SetAndLoadInitialTopicL
+        	//TSW Error:EJZG-7E2BUV
+        	ClearHistoryL();
+        	return;
+        	}
+            
+        iNewTopic = iDocument.GetHtmlTopicForUrlL(iUrlNoAnchors);            
+        CheckForMSK();
+        }
+    // Only when loadhtml is called, in that condition, last-displayed content may show;
+    // then we should hide browser.
+    else  if ( iContentLoading == EContentLoading )
+        {
+        HideBrowser();
+        }
+    }
+    
+CCSXHHelpContentBase* CCSXHHtmlTopicContainer::GetCurrActiveObject()
+    	{
+    	return iNewTopic;
+    	}    
+// --------------------------------------------------------------------------
+// Back Key Handling
+// --------------------------------------------------------------------------
+TBool CCSXHHtmlTopicContainer::HandleBackKeyL()
+    {
+    //When this view is initially created, the HTML content is loaded 
+    //using the LoadDataL function and hence it will not be part of the
+    //History stack but all other subsequest navigation by the user 
+    //using the hyperlinks will be part of the History Stack
+    if(IsPrevPageAvbl())
+        {
+        iBack = ETrue;
+        TRAPD(res,HandleCommandBackL());
+        if(res == KErrNone)
+            return ETrue;
+        else
+            ClearHistoryL();
+        }
+    ClearHistoryL();
+        
+    return EFalse;  
+    }
+TBool CCSXHHtmlTopicContainer::IsPrevHtmlPageAvblL()
+    {
+    if(IsPrevPageAvbl())
+        return ETrue;
+    
+    return EFalse;  
+    }
+
+void CCSXHHtmlTopicContainer::SetSelectedFontSizeL(TInt aValue)
+    {
+    iBrCtrl->SetBrowserSettingL(TBrCtlDefs::ESettingsFontSize,aValue);  
+    }
+    
+TInt CCSXHHtmlTopicContainer::GetCurrentValueL(TInt aSetting)
+    {
+        return iBrCtrl->BrowserSettingL(aSetting);  
+    }   
+
+void CCSXHHtmlTopicContainer::UpdateSoftkeyL(TBrCtlKeySoftkey /*aKeySoftkey*/,
+                                    const TDesC& /*aLabel*/,
+                                    TUint32 /*aCommandId*/,
+                                    TBrCtlSoftkeyChangeReason /*aBrCtlSoftkeyChangeReason*/)
+    {
+    }
+
+void CCSXHHtmlTopicContainer::UpdateBrowserVScrollBarL(TInt /*aDocumentHeight*/, 
+                                              TInt /*aDisplayHeight*/,
+                                              TInt /*aDisplayPosY*/ ) 
+    {
+    if(iBrCtrl)
+        CheckForMSK();
+}
+void CCSXHHtmlTopicContainer::UpdateBrowserHScrollBarL(TInt /*aDocumentWidth*/, 
+                                              TInt /*aDisplayWidth*/,
+                                              TInt /*aDisplayPosX*/ )
+    {
+    if(iBrCtrl)
+        CheckForMSK();
+    }
+void CCSXHHtmlTopicContainer::NotifyLayoutChange( TBrCtlLayout /*aNewLayout*/ )
+    {
+    }
+        
+void CCSXHHtmlTopicContainer::UpdateTitleL( const TDesC& /*aTitle*/ )
+    {
+    }
+
+void CCSXHHtmlTopicContainer::CheckForMSK()
+    {
+    if(IsHyperLinkFocused())
+        {
+        iView->SetMiddleSoftKey(ETrue); 
+        }
+    else
+        {
+        iView->SetMiddleSoftKey(EFalse);    
+        }
+    }
+    
+TBool CCSXHHtmlTopicContainer::IsHyperLinkFocused() 
+    {
+    if(TBrCtlDefs::EElementAnchor == iBrCtrl->FocusedElementType())
+        return ETrue;
+    else
+        return EFalse;
+    }
+    
+void CCSXHHtmlTopicContainer::HandleCommandOpenHyperLinkL()
+    {
+    iBrCtrl->HandleCommandL(TBrCtlDefs::ECommandIdBase + TBrCtlDefs::ECommandOpen);
+    }
+
+TBool CCSXHHtmlTopicContainer::CheckForExternalLinkL(const TDesC& aUrl)
+	{
+    TBool Result = EFalse;
+        
+    if( KErrNotFound != aUrl.Find(_L("http://")) |
+        KErrNotFound != aUrl.Find(_L("https://")) |
+        KErrNotFound != aUrl.Find(_L("ftp://")))
+        {
+        iAppLauncher->LaunchBrowserNGL(aUrl);           
+        Result = ETrue;
+        }
+        
+    return Result;
+	}
+
+void CCSXHHtmlTopicContainer::SetContentLoadState( TContentLoadState aLoadState )
+    {
+    if ( iContentLoading == aLoadState )
+        {
+        return;
+        }
+    else if ( NeedRefresh( aLoadState ) )
+        {
+        iContentLoading = aLoadState;
+        SizeChanged();
+        }
+    else
+        {
+        iContentLoading = aLoadState;
+        }
+    }
+
+TBool CCSXHHtmlTopicContainer::NeedRefresh( const TContentLoadState aNewLoadState ) const
+    {
+    if ( 
+            ( iContentLoading == EContentLoading && aNewLoadState != EContentLoading )
+            ||( iContentLoading != EContentLoading && aNewLoadState == EContentLoading )
+        )
+        return ETrue;
+    else
+        return EFalse;
+    }
+
+void CCSXHHtmlTopicContainer::HideBrowser()
+    {
+    SetTopAndBottomContainer( iBlankContainer, iBrCtrl );
+    }
+
+void CCSXHHtmlTopicContainer::ShowBrowser()
+    {
+    SetTopAndBottomContainer( iBrCtrl, iBlankContainer );
+    }
+
+void CCSXHHtmlTopicContainer::SetTopAndBottomContainer( CCoeControl* aTopControl, 
+        CCoeControl* aBottomControl )
+    {
+    iTopControl = aTopControl;
+    iBottomControl = aBottomControl;
+    }
+    
+//end of the file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/src/CSXHHtmlTopicView.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,378 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHHtmlTopicView class definition
+*
+*/
+
+// INCLUDES
+#include "CSXHHtmlTopicView.h"
+#include "CSXHHtmlTopicContainer.h"
+#include "CSXHHtmlTOC2.h"
+#include "CSXHAppUi.h"
+#include "CSXHDocument.h"
+#include <cshelp.rsg>
+#include "CsHelp.hrh"
+
+#include "CSXHViewIDs.h"
+#include "CSXHKywdTOC1.h"
+#include "CSXHHelpDataBase.h"
+#include "CSXHContextTopic.h"
+#include "CSXHHtmlTOC2.h"
+#include "CSXHHtmlTOC1.h" 
+
+#include <avkon.hrh>
+#include <aknnotewrappers.h> 
+#include <brctldefs.h>
+#include <f32file.h>
+#include <apgcli.h>
+#include <akntitle.h>
+
+#include <AiwMenu.h>
+#include <AiwCommon.h>
+#include <AiwServiceHandler.h>
+#include <AknGlobalNote.h>
+TInt CCSXHHtmlTopicView::iFontSize = TBrCtlDefs::EFontSizeLevelLarger;
+
+CCSXHHtmlTopicView* CCSXHHtmlTopicView::NewL(const TUid& aUid, const TInt& aFlags,const 
+TRect& aRect)
+    {
+    CCSXHHtmlTopicView* temp = new(ELeave) CCSXHHtmlTopicView(aUid,aFlags);
+    CleanupStack::PushL(temp);
+    temp->ConstructL(aRect);
+    CleanupStack::Pop(temp);
+    return temp;
+    }
+
+CCSXHHtmlTopicView::CCSXHHtmlTopicView(const TUid& aUid, const TInt& aFlags):
+                        iUid(aUid),iAppFlags(aFlags)
+    {   
+    }
+CCSXHHtmlTopicView::~CCSXHHtmlTopicView()
+    {
+    if(iBCContainer)
+        {
+        delete iBCContainer;
+        iBCContainer = NULL;
+        }
+    }
+    
+void CCSXHHtmlTopicView::ConstructL(const TRect& /*aRect*/)
+    {
+    BaseConstructL(iAppFlags);
+    }
+
+void CCSXHHtmlTopicView::SetViewTypeL(TInt type)
+	{
+	if(type == iContextTopicView)
+		return;
+	
+	if(type == EContextHtmlView)
+		{
+		iContextTopicView = ETrue;
+		SetSoftKeysL(R_CSHELP_SOFTKEYS_OPTIONS_CLOSE_OPENLINK);
+		}
+	else
+		{
+		iContextTopicView = EFalse;
+		SetSoftKeysL(R_CSHELP_SOFTKEYS_OPTIONS_BACK_OPENLINK);
+		}	
+	}
+	
+TInt CCSXHHtmlTopicView::GetViewType()	
+	{
+	return iContextTopicView ? EContextHtmlView : EHtmlView;
+	}
+    
+TUid CCSXHHtmlTopicView::Id() const 
+    {
+    return iUid;
+    }
+// --------------------------------------------------------------------------
+// Launches an application based on the Application UID and a View ID
+// --------------------------------------------------------------------------    
+void CCSXHHtmlTopicView::HandleCommandL(TInt  aCommand  )
+    {
+    switch(aCommand)
+        {
+        case EAknSoftkeyBack:
+            {
+            if(iBCContainer->HandleBackKeyL())
+                return;
+            CCSXHDocument *doc = static_cast<CCSXHDocument*>(AppUi()->Document());              
+            //if not the current view, return
+            TUid viewId = doc->GetDisplayTopic()->GetViewID();
+            if( viewId != KCSXHHtmlTopicViewID && viewId != KCSXHKywdToc2ViewID )
+                {
+                return;
+                }          
+            CCSXHHtmlTOC2 *displayTopic = STATIC_CAST(CCSXHHtmlTOC2*,doc->GetDisplayTopic());
+            CCSXHKywdTOC1* kywdParent = displayTopic->GetKywdParent();
+            if(kywdParent)
+                {
+                doc->SetDisplayAndPrevTopic(kywdParent);    
+                AppUi()->HandleCommandL(ECSXHOpenItem); 
+                }
+            else
+                {
+                HandleCommandL(ECSXHOpenApplicationTopics); 
+                }   
+            break;  
+            }
+        case ECSXHOpenApplicationTopics:       
+            {
+            CCSXHDocument *doc = static_cast<CCSXHDocument*>(AppUi()->Document());   
+            if(iBCContainer->GetCurrActiveObject())
+            	{
+            	doc->SetDisplayTopic(iBCContainer->GetCurrActiveObject());
+            	CCSXHAppUi::GetInstance()->ResetTOC2ViewContainer();
+            	}            	           
+            CCSXHHtmlTOC2 *displayTopic = STATIC_CAST(CCSXHHtmlTOC2*,doc->GetDisplayTopic());
+            doc->SetDisplayAndPrevTopic(displayTopic->GetParent()); 
+            AppUi()->HandleCommandL(ECSXHOpenItem);
+            }
+            break;
+        case ECSXHTOC1ListView:
+            {
+            CCSXHDocument *doc = static_cast<CCSXHDocument*>(AppUi()->Document());      
+            if(iBCContainer->GetCurrActiveObject())
+            	{
+            	doc->SetDisplayTopic(iBCContainer->GetCurrActiveObject());
+            	CCSXHAppUi::GetInstance()->ResetTOC2ViewContainer();
+            	}            	        
+            	
+            CCSXHHtmlTOC2 *displayTopic = STATIC_CAST(CCSXHHtmlTOC2*,doc->GetDisplayTopic());
+            //These two steps are necessary to set the correct display and prev topics
+            doc->SetDisplayTopic(displayTopic->GetParent());    
+            doc->SetDisplayAndPrevTopic(doc->GetHelpDataBase()->GetMainTopics());   
+            AppUi()->HandleCommandL(ECSXHOpenItem); 
+            }
+            break;
+        case ECsHelpCmdFontLarge:
+            {
+            TInt CurrentFontSize = iBCContainer->GetCurrentValueL(TBrCtlDefs::ESettingsFontSize);
+            iBCContainer->SetSelectedFontSizeL(++CurrentFontSize);
+            iFontSize = CurrentFontSize;
+            }
+            break;
+        case ECsHelpCmdFontSmall:
+            {
+            TInt CurrentFontSize = iBCContainer->GetCurrentValueL(TBrCtlDefs::ESettingsFontSize);
+            iBCContainer->SetSelectedFontSizeL(--CurrentFontSize);
+            iFontSize = CurrentFontSize;
+            }
+            break;
+        case ECSXHOpenHyperLink: 
+            {           
+            iBCContainer->HandleCommandOpenHyperLinkL();
+            }
+            break;
+		case ECSXHSearchText:
+			{		
+        	CCSXHDocument *doc = static_cast<CCSXHDocument*>(AppUi()->Document()); 
+        	if(iBCContainer->GetCurrActiveObject())
+	        	{
+	        	doc->SetDisplayTopic(iBCContainer->GetCurrActiveObject());
+	       		CCSXHAppUi::GetInstance()->ResetTOC2ViewContainer();
+	        	}            
+        	}
+			AppUi()->HandleCommandL( aCommand );
+			break;
+        case EAknSoftkeyExit:
+        case EAknSoftkeyClose: 
+            AppUi()->HandleCommandL( aCommand );
+            break;
+        default:
+            break;      
+        }     
+    }
+// --------------------------------------------------------------------------
+// Handlign for view activation. For a context view, the actual display topic
+// has to be modified
+// --------------------------------------------------------------------------
+void CCSXHHtmlTopicView::DoActivateL(const TVwsViewId& aPrevViewId,TUid,const TDesC8&)  
+    {
+    iPrevious = aPrevViewId;    
+    CCSXHDocument *doc = static_cast<CCSXHDocument*>(AppUi()->Document());  
+     
+    if(!iBCContainer)
+    	{
+    	TRAPD(Result,iBCContainer = CCSXHHtmlTopicContainer::NewL(ClientRect(),*doc,this));
+    	if(KErrNone != Result)
+    		return;
+    	}
+    
+    //Set the correct display topic here for context sensitive launch
+    if(doc->GetDisplayTopic()->GetViewID() == KCSXHContextHtmlTopicViewID)
+        {
+        CCSXHContextTopic *topic = STATIC_CAST(CCSXHContextTopic*,doc->GetDisplayTopic());
+        doc->SetDisplayTopic(topic->GetTopic());
+        iContextTopicView = ETrue;
+        }
+    else
+    	{
+    	iContextTopicView = EFalse;
+    	}    
+	
+	CCSXHHtmlTOC2 *displayTopic = STATIC_CAST(CCSXHHtmlTOC2*,doc->GetDisplayTopic());
+    TRAPD(err,iBCContainer->SetAndLoadInitialTopicL(displayTopic));
+
+   	if( KErrNone != err )    
+   	    {
+   	    delete iBCContainer;
+   	    iBCContainer = NULL;
+   	    return;
+   	    }
+   	if( iContextTopicView )
+   	    {
+   	    SetSoftKeysL(R_CSHELP_SOFTKEYS_OPTIONS_CLOSE_OPENLINK);
+   	    }
+   	else
+   	    {
+   	    SetSoftKeysL(R_CSHELP_SOFTKEYS_OPTIONS_BACK_OPENLINK);
+   	    }
+    iBCContainer->SetMopParent(this); 
+    iBCContainer->SetRect(ClientRect());
+    AppUi()->AddToStackL(*this, iBCContainer);    
+    iBCContainer->MakeVisible(ETrue);     
+    }
+                             
+void CCSXHHtmlTopicView::DoDeactivate()                             
+    {   
+    if(iBCContainer)
+        {
+        iBCContainer->MakeVisible(EFalse);
+        TRAP_IGNORE(iBCContainer->CancelFetchL());
+        // FEP causes crash if it still hold the observer.
+        // fix as FEP suggested.
+        iBCContainer->SetFocus( EFalse );
+        AppUi()->RemoveFromStack(iBCContainer);
+        }
+    }
+// --------------------------------------------------------------------------
+// When a view which was previously activated, goes to background and gets
+// activated again, the DoActivateL will not be called only ViewActivatedL 
+// will be called. Special handling is required for the context view for the
+// scenario, open context help from any application, with out changing the 
+// help view, open context help from another application, the contents of the
+// context view has to be refreshed with the new topic
+// --------------------------------------------------------------------------    
+void CCSXHHtmlTopicView::ViewActivatedL(const TVwsViewId& aPrevViewId,
+                                 TUid aCustomMessageId,
+                                 const TDesC8& aCustomMessage)
+    {
+    
+    if(iBCContainer)
+    	{
+        //This handling is required for the following scenario
+    	//Context sensitive help launch more than once with no 
+	    //other view navigation in the help application
+    	CCSXHDocument *doc = static_cast<CCSXHDocument*>(AppUi()->Document());
+     	if(doc->GetDisplayTopic()->GetViewID() == KCSXHContextHtmlTopicViewID)
+ 	    	{
+        	CCSXHContextTopic *topic = static_cast<CCSXHContextTopic*>(doc->GetDisplayTopic());
+        	doc->SetDisplayTopic(topic->GetTopic());
+        	CCSXHHtmlTOC2 *displayTopic = STATIC_CAST(CCSXHHtmlTOC2*,doc->GetDisplayTopic());
+        	iBCContainer->RefreshL(displayTopic);
+        	SetSoftKeysL(R_CSHELP_SOFTKEYS_OPTIONS_CLOSE_OPENLINK);
+         	}
+        iBCContainer->CheckForMSK();
+    	}
+    CAknView::ViewActivatedL(aPrevViewId,aCustomMessageId,aCustomMessage);
+    }
+    
+void CCSXHHtmlTopicView::SetSoftKeysL(TInt aSoftKeys)
+    {    
+    if( Cba() )
+        {
+        Cba()->SetCommandSetL( aSoftKeys );
+        Cba()->DrawDeferred();   	
+        }
+    }
+// --------------------------------------------------------------------------
+// Dynamically updating Options menu item
+// --------------------------------------------------------------------------    
+void CCSXHHtmlTopicView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
+    {
+
+    if( R_CSXH_MENU_HTMLTOPICVIEW == aResourceId)
+        {    
+        TInt CurrentFontSize = iBCContainer->GetCurrentValueL(TBrCtlDefs::ESettingsFontSize);
+        
+        if(CurrentFontSize == TBrCtlDefs::EFontSizeLevelNormal)
+            {
+            aMenuPane->SetItemDimmed(ECsHelpCmdFontSmall,ETrue);
+            }
+        else if(CurrentFontSize == TBrCtlDefs::EFontSizeLevelAllLarge)
+            {
+            aMenuPane->SetItemDimmed(ECsHelpCmdFontLarge,ETrue);
+            }
+        
+        if(!iBCContainer->IsHyperLinkFocused())
+            {
+            aMenuPane->SetItemDimmed(ECSXHOpenHyperLink,ETrue);
+            }
+        }
+    }
+// --------------------------------------------------------------------------
+// MSK Handling
+// --------------------------------------------------------------------------
+void CCSXHHtmlTopicView::SetMiddleSoftKey(TBool aValue)
+    {
+#ifndef __SERIES60_30__    
+    if(AknLayoutUtils::MSKEnabled())
+        {        
+        Cba()->MakeCommandVisible(ECSXHOpenHyperLink,aValue);
+        Cba()->DrawDeferred();
+        }
+#endif      
+    }
+    
+TInt CCSXHHtmlTopicView::GetCurrentFontSize()
+ 	{
+ 	return iFontSize;
+ 	}
+ 	
+void CCSXHHtmlTopicView::ResourceChangeHdl(TInt aType)
+    {
+    if(iBCContainer)
+        iBCContainer->HandleResourceChangeImpl(aType);
+    } 
+    
+#ifdef FF_HELP_TUTORIAL_MERGE
+ // --------------------------------------------------------------------------
+// CCSXHAppUi::LaunchTutorial
+// Lauch tutorial if exist, else popup a error message.
+// --------------------------------------------------------------------------
+void CCSXHHtmlTopicView::LaunchTutorialL()
+    {
+    CCSXHDocument *doc = static_cast<CCSXHDocument*>(AppUi()->Document());
+    CCSXHHtmlTOC2 *displayTopic = STATIC_CAST(CCSXHHtmlTOC2*,doc->GetDisplayTopic());
+    TCoeHelpContext helpContext;
+    displayTopic->GetHelpContext(helpContext);
+    CCSXHAppUi::GetInstance()->SetHelpContext(helpContext);
+    if( CCSXHAppUi::GetInstance()->IsApplicationPresentInTutorialL() )
+        {
+        CCSXHAppUi::GetInstance()->CallTutorialAiwProviderL();
+        }
+    else
+        {
+        HBufC* ErrorMessage = iCoeEnv->AllocReadResourceLC(R_TYPE_NO_HELP_TOPICS);
+        CAknGlobalNote* note = CAknGlobalNote::NewLC();
+        note->ShowNoteL(EAknGlobalInformationNote, *ErrorMessage);
+
+        CleanupStack::PopAndDestroy(note);
+        CleanupStack::PopAndDestroy(ErrorMessage);
+        }
+    }
+#endif // FF_HELP_TUTORIAL_MERGE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/src/CSXHLegacyTopicContainer.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,364 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHLegacyTopicContainer class definition
+*
+*/
+
+
+#include "CSXHLegacyTOC2.h"
+#include "CSXHLegacyTopicContainer.h"
+#include "CSXHDocument.h"
+
+#include "CSXHAppUi.h"
+
+#include <eikrted.h>
+#include <txtrich.h>
+#include <aknkeys.h>
+#include <AknUtils.h>
+#include <barsread.h>
+#include <applayout.cdl.h>    //Dynamic layout functions
+#include <AknsDrawUtils.h> 
+#include <AknsBasicBackgroundControlContext.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <aknappui.h>
+#include <txtfrmat.h> 
+#include <cshelp.rsg>
+
+CCSXHLegacyTopicContainer* CCSXHLegacyTopicContainer::NewL(const TRect& 
+aRect,CCSXHDocument &aDocument,CCSXHLegacyTOC2 *aTopic)
+    {
+    CCSXHLegacyTopicContainer* self = CCSXHLegacyTopicContainer::NewLC(aRect,aDocument,aTopic);
+    CleanupStack::Pop(self);
+    return self;
+    }
+    
+CCSXHLegacyTopicContainer* CCSXHLegacyTopicContainer::NewLC(const TRect& 
+aRect,CCSXHDocument &aDocument,CCSXHLegacyTOC2 *aTopic)
+    {
+    CCSXHLegacyTopicContainer* self = new (ELeave) CCSXHLegacyTopicContainer(aDocument,aTopic);
+    CleanupStack::PushL(self);
+    self->ConstructL(aRect);
+    return self;
+    }
+
+CCSXHLegacyTopicContainer::CCSXHLegacyTopicContainer(CCSXHDocument 
+&aDocument,CCSXHLegacyTOC2 *aTopic):iDocument(aDocument),iTopic(aTopic)
+    {
+    }
+
+void CCSXHLegacyTopicContainer::ConstructL(const TRect& aRect/*, CRichText* aText*/)
+    {
+    CreateWindowL();
+    TRect rect(0,0,0,0);
+    // Temporary rect is passed. Correct rect is set in SizeChanged.
+    iSkinContext = CAknsBasicBackgroundControlContext::NewL(
+       KAknsIIDQsnBgAreaMain , rect, EFalse);
+       
+    iText = STATIC_CAST(CRichText*,iTopic->GetTopicContentL());
+    
+    GetTextFormat();
+
+    iEdwin = new(ELeave) CEikEdwin();
+    TInt flags(CEikEdwin::EKeepDocument |
+               CEikEdwin::EUserSuppliedText |
+               CEikEdwin::ENoAutoSelection |
+               CEikEdwin::EAvkonDisableCursor |
+               CEikEdwin::EReadOnly |
+               CEikEdwin::EDisplayOnly);
+
+    if ( iText == NULL )
+        {
+        flags = flags & ~CEikEdwin::EUserSuppliedText;
+        }
+
+    iEdwin->SetContainerWindowL(*this);
+
+    iEdwin->ConstructL(flags);
+    iEdwin->CreatePreAllocatedScrollBarFrameL()->SetScrollBarVisibilityL(
+                                                 CEikScrollBarFrame::EOff,
+                                                 CEikScrollBarFrame::EAuto);
+    SetTextL(iText);
+    if( iText != NULL )
+        {
+        FormatRichTextL(*iText);
+        }
+    SetRect(aRect);
+    ActivateL();
+    }
+
+CCSXHLegacyTopicContainer::~CCSXHLegacyTopicContainer()
+    {
+    delete iEdwin;
+    delete iSkinContext;
+    }
+
+void CCSXHLegacyTopicContainer::RefreshL(CCSXHLegacyTOC2 *aTopic)
+    {
+    iTopic = aTopic;
+    iText = STATIC_CAST(CRichText*,iTopic->GetTopicContentL());
+    SetTextL(iText);
+    if( iText != NULL )
+        {
+        FormatRichTextL(*iText);
+        }
+    SizeChanged();
+    }
+
+void CCSXHLegacyTopicContainer::SetTextL(CRichText* aText)
+    {
+    if( aText == NULL )
+        {
+        HBufC* errorMessage = iCoeEnv->AllocReadResourceLC( R_TYPE_NO_HELP_TOPICS );
+        iEdwin->SetTextL( errorMessage );
+        CleanupStack::PopAndDestroy( errorMessage ); 
+        }
+    else
+        {
+        iEdwin->SetDocumentContentL(*aText, CEikEdwin::EUseText);
+        iEdwin->SetCursorPosL(0, EFalse);
+        }    
+    }
+
+void CCSXHLegacyTopicContainer::FocusChanged(TDrawNow aDrawNow)
+    {
+    if (iEdwin)
+        {
+        iEdwin->SetFocus(IsFocused(), aDrawNow);
+        }
+    }
+
+void CCSXHLegacyTopicContainer::GetTextFormat()
+    {
+    
+    TAknMultiLineTextLayout layoutToUse;
+    if( AknLayoutUtils::ScalableLayoutInterfaceAvailable() )
+        {
+        
+        TAknTextLineLayout layoutnew1 = AknLayoutScalable_Apps::help_list_pane_t1(0).LayoutLine();
+        
+
+        TAknLayoutScalableParameterLimits limits1 = 
+            AknLayoutScalable_Apps::help_list_pane_t1_ParamLimits();
+            
+        TInt numberoflines = limits1.LastRow() + 1;
+        
+        layoutnew1.iNumberOfLinesShown = numberoflines ;
+    
+        layoutToUse.iC = layoutnew1.iC;
+        layoutToUse.il = layoutnew1.il;
+        layoutToUse.ir = layoutnew1.ir;
+        layoutToUse.iB = layoutnew1.iB;
+        layoutToUse.iW = layoutnew1.iW;
+        layoutToUse.iJ = layoutnew1.iJ;
+        layoutToUse.iFont = layoutnew1.iFont;
+        layoutToUse.iBaselineSkip = layoutnew1.iBaselineSkip;
+        layoutToUse.iNumberOfLinesShown = layoutnew1.iNumberOfLinesShown;
+        }
+    else
+        {
+        layoutToUse = AppLayout::Multiline_Help_texts_Line_1(0);
+        }
+
+    const CFont* font = AknLayoutUtils::FontFromId(layoutToUse.FontId() /*iFont*/, NULL);
+    iCharFormat.iFontSpec = font->FontSpecInTwips();
+    iCharFormatMask.SetAttrib(EAttFontTypeface);
+    iCharFormatMask.SetAttrib(EAttFontHeight);
+
+    TRgb color;
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    TInt error = AknsUtils::GetCachedColor(skin, color, KAknsIIDQsnTextColors, 
+    													EAknsCIQsnTextColorsCG6 );
+    if(error==KErrNone)
+        iCharFormat.iFontPresentation.iTextColor = color;
+    
+    iCharFormatMask.SetAttrib(EAttColor);
+    iCharFormatMask.SetAttrib(EAttFontPosture);    
+ }
+void CCSXHLegacyTopicContainer::FormatRichTextL( CRichText& aText )
+    {
+    TInt length = aText.DocumentLength();
+    length++;
+    // Apply the general formatting rules...
+    aText.ApplyCharFormatL( iCharFormat, iCharFormatMask, 0, length );
+    
+    TParaFormatMask paraFormatMask;
+	paraFormatMask.SetAttrib( EAttBullet );
+	CParaFormat *paraFormat  = new ( ELeave ) CParaFormat;
+	CleanupStack::PushL(paraFormat);	
+	TInt paraCount = aText.ParagraphCount();
+	for(TInt i = 0; i < paraCount ; ++i)
+		{
+		TInt paraLength;
+		TInt paraStart = aText.CharPosOfParagraph(paraLength,i);
+		
+		aText.GetParagraphFormatL(paraFormat,paraStart);
+		if(paraFormat->iBullet)
+			{
+			TBullet* bullet = new ( ELeave ) TBullet;
+			CleanupStack::PushL(bullet);
+			bullet->iColor = iCharFormat.iFontPresentation.iTextColor;
+			bullet->iHeightInTwips = iCharFormat.iFontSpec.iHeight;
+			
+			CParaFormat* paraFormatNew = new ( ELeave ) CParaFormat;			
+			paraFormatNew->iBullet = bullet; // ownership xfer
+			
+			CleanupStack::Pop();
+			CleanupStack::PushL(paraFormatNew);
+			
+			aText.ApplyParaFormatL( paraFormatNew, paraFormatMask, paraStart, paraLength - 1);
+			CleanupStack::PopAndDestroy(paraFormatNew);
+			}
+		}
+	CleanupStack::PopAndDestroy(paraFormat);
+    }
+
+
+void CCSXHLegacyTopicContainer::SizeChanged()
+    {
+	if(iSkinContext)
+        	iSkinContext->SetRect(Rect());
+    if(iEdwin)
+    	{
+    	TRect clientrect = Rect();
+    	if(AknLayoutUtils::LayoutMirrored())
+			{
+			clientrect.iTl.iX = clientrect.iTl.iX + (iEdwin->ScrollBarFrame()
+    				->ScrollBarBreadth(CEikScrollBar::EVertical))* 1.1;    		
+			}
+		else
+			{
+    		TInt RectWidth =  clientrect.Width() - (iEdwin->ScrollBarFrame()
+    				->ScrollBarBreadth(CEikScrollBar::EVertical))* 1.1;      
+			
+    		clientrect.SetWidth(RectWidth);
+			}
+    	
+       	iEdwin->SetRect(clientrect);
+       	TRAP_IGNORE(iEdwin->ForceScrollBarUpdateL());
+    	}    
+    }
+
+// ---------------------------------------------------------
+// CCsHelpTopicContainer::OfferKeyEventL(...)
+// Processing a key event
+//  
+// (other items were commented in a header).
+// ---------------------------------------------------------
+TKeyResponse CCSXHLegacyTopicContainer::OfferKeyEventL(
+                                      const TKeyEvent& aKeyEvent,
+                                      TEventCode aType)
+    {
+    TKeyResponse result(EKeyWasConsumed);
+ 
+    switch (aKeyEvent.iCode)
+        {            
+        case EKeyUpArrow:
+            iEdwin->MoveDisplayL(TCursorPosition::EFLineUp);
+            iEdwin->UpdateScrollBarsL();
+            break;
+        case EKeyDownArrow:
+            iEdwin->MoveDisplayL(TCursorPosition::EFLineDown);
+            iEdwin->UpdateScrollBarsL();
+            break;
+        default:
+            result = iEdwin->OfferKeyEventL(aKeyEvent, aType);
+        }
+
+    return result;
+    }
+
+
+// ---------------------------------------------------------
+// CCsHelpTopicContainer::CountComponentControls() const
+//
+//  
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TInt CCSXHLegacyTopicContainer::CountComponentControls() const
+    {
+    return 1; // return nbr of controls inside this container
+    }
+
+// ---------------------------------------------------------
+// CCsHelpTopicContainer::ComponentControl(TInt aIndex) const
+//
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+CCoeControl* CCSXHLegacyTopicContainer::ComponentControl(TInt aIndex) const
+    {
+    switch ( aIndex )
+        {
+        case 0:
+            return iEdwin;
+        default:
+            return NULL;
+        }
+    }
+
+// ---------------------------------------------------------
+// CCsHelpTopicContainer::Draw(..)
+//
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CCSXHLegacyTopicContainer::Draw(const TRect& aRect) const
+    {
+    CWindowGc& gc = SystemGc();
+    gc.Clear(aRect);
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    if (iSkinContext)
+        {//Draw the skin background
+        AknsDrawUtils::Background(
+            skin, iSkinContext, this, gc, aRect);
+        }
+    }
+void CCSXHLegacyTopicContainer::HandleResourceChange(TInt aType)
+    {
+     CCSXHAppUi::GetInstance()->PropagateResourceChange(aType);                
+    }
+
+void CCSXHLegacyTopicContainer::HandleResourceChangeImpl(TInt aType)
+    {
+    if(aType == KEikDynamicLayoutVariantSwitch)
+        {
+        iEdwin->HandleResourceChange(aType);
+        TRect mainRect; 
+        AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane,mainRect);        
+        SetRect(mainRect);        
+        }
+    else
+        {
+        CCoeControl::HandleResourceChange(aType);
+        }
+    
+    }
+
+
+// ---------------------------------------------------------
+// CCsHelpTopicContainer::MopSupplyObject()
+// Pass skin information if need.
+// ---------------------------------------------------------
+
+TTypeUid::Ptr CCSXHLegacyTopicContainer::MopSupplyObject(TTypeUid aId)
+    {
+    if (aId.iUid == MAknsControlContext::ETypeId && iSkinContext)
+        {
+        return MAknsControlContext::SupplyMopObject(aId, iSkinContext);
+        }
+
+    return CCoeControl::MopSupplyObject(aId);
+    }
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/src/CSXHLegacyTopicView.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,213 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHLegacyTopicView class definition
+*
+*/
+
+
+// INCLUDES
+#include "CSXHLegacyTopicView.h"
+#include "CSXHLegacyTopicContainer.h"
+#include "CSXHAppUi.h"
+#include "CSXHDocument.h"
+#include <cshelp.rsg>
+#include "CsHelp.hrh"
+
+#include "CSXHHelpContentBase.h"
+#include "CSXHLegacyTOC2.h"
+#include "CSXHLegacyTOC1.h" 
+#include "CSXHViewIDs.h"
+#include "CSXHHelpDataBase.h"
+#include "CSXHContextTopic.h"
+
+#include <akntitle.h>
+
+CCSXHLegacyTopicView* CCSXHLegacyTopicView::NewL(const TUid& aUid, 
+                                        const TInt& aFlags,const TRect& aRect)
+    {
+    CCSXHLegacyTopicView* temp = new(ELeave) CCSXHLegacyTopicView(aUid,aFlags);
+    CleanupStack::PushL(temp);
+    temp->ConstructL(aRect);
+    CleanupStack::Pop(temp);
+    return temp;
+    }
+
+CCSXHLegacyTopicView::CCSXHLegacyTopicView(const TUid& aUid, const TInt& aFlags)
+                        : iUid(aUid),iAppFlags(aFlags)
+    {
+    }
+    
+CCSXHLegacyTopicView::~CCSXHLegacyTopicView()
+    {
+    }
+    
+void CCSXHLegacyTopicView::ConstructL(const TRect& /*aRect*/)
+    {
+    BaseConstructL(iAppFlags);
+    }
+    
+TUid CCSXHLegacyTopicView::Id() const   
+    {
+    return iUid;
+    }
+// --------------------------------------------------------------------------
+// Launches an application based on the Application UID and a View ID
+// --------------------------------------------------------------------------
+void CCSXHLegacyTopicView::HandleCommandL(TInt aCommand)
+    {
+    switch(aCommand)
+        {       
+        case ECSXHOpenApplicationTopics:
+            {
+            CCSXHDocument* doc = static_cast<CCSXHDocument*>(AppUi()->Document());              
+            CCSXHLegacyTOC2* displayTopic = STATIC_CAST(CCSXHLegacyTOC2*,doc->GetDisplayTopic());
+            CCSXHLegacyTOC1* toc1 = displayTopic->GetLegacyParent();
+            if(toc1)
+                {
+                doc->SetDisplayAndPrevTopic(toc1);
+                AppUi()->HandleCommandL(ECSXHOpenItem);
+                }
+            else
+                {
+                //Handling will be same as EAknSoftkeyBack
+                HandleCommandL(EAknSoftkeyBack);
+                }
+            break;      
+            }
+        case EAknSoftkeyBack:
+            {
+            CCSXHDocument* doc = static_cast<CCSXHDocument*>(AppUi()->Document());              
+            CCSXHLegacyTOC2* displayTopic = STATIC_CAST(CCSXHLegacyTOC2*,doc->GetDisplayTopic());
+            doc->SetDisplayAndPrevTopic(displayTopic->GetParent());
+            AppUi()->HandleCommandL(ECSXHOpenItem);                 
+            }               
+        break;
+        case ECSXHTOC1ListView:
+            {
+            CCSXHDocument* doc = static_cast<CCSXHDocument*>(AppUi()->Document());              
+            CCSXHLegacyTOC2* displayTopic = STATIC_CAST(CCSXHLegacyTOC2*,doc->GetDisplayTopic());
+            CCSXHGenericTOC1* toc1 = displayTopic->GetLegacyParent();
+            if(!toc1)
+                toc1 = displayTopic->GetParent();
+            doc->SetDisplayTopic(toc1);
+            doc->SetDisplayAndPrevTopic(doc->GetHelpDataBase()->GetMainTopics());   
+            AppUi()->HandleCommandL(ECSXHOpenItem);
+            }
+            break;  
+        default:
+            AppUi()->HandleCommandL(aCommand);  
+            break;
+        }   
+    }
+
+// --------------------------------------------------------------------------
+// Handlign for view activation. For a context view, the actual display topic
+// has to be modified
+// --------------------------------------------------------------------------
+void CCSXHLegacyTopicView::DoActivateL(const TVwsViewId& aPrevViewId,TUid /* aCustomMessageId */,
+                             const TDesC8& /* aCustomMessage */)    
+    {
+    iPrevious = aPrevViewId;
+    CCSXHDocument* doc = static_cast<CCSXHDocument*>(AppUi()->Document());
+     //Set the correct display topic here for context sensitive launch
+    if(iUid == KCSXHContextLegacyTopicViewID)
+        {
+        CCSXHContextTopic* topic = STATIC_CAST(CCSXHContextTopic*,doc->GetDisplayTopic());
+        doc->SetDisplayTopic(topic->GetTopic());
+        }
+            
+    if(!iTopicContainer)
+        {
+        CCSXHLegacyTOC2* displayTopic = STATIC_CAST(CCSXHLegacyTOC2*,doc->GetDisplayTopic());
+        iTopicContainer = CCSXHLegacyTopicContainer::NewL(ClientRect(),*doc,displayTopic);
+        }
+        
+    iTopicContainer->SetMopParent(this);
+    iTopicContainer->SetRect(ClientRect());
+    AppUi()->AddToStackL(*this, iTopicContainer);
+    iTopicContainer->MakeVisible(ETrue);
+    
+    //Set the title of the view
+    CEikStatusPane* sp = StatusPane();
+    CAknTitlePane* title = STATIC_CAST(CAknTitlePane*, 
+            sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle)));
+    title->SetTextL(doc->GetDisplayTopic()->GetName());
+    
+   	//MSK: Should be Inactive in this view
+	//TSW Error:EAJA-6XLFTW :
+	//S60 3.2 Help: Selection key opens Option menu in Topic view 
+	//If MSK is not defined, "." appears in the MSK, 
+	//On Middle key press, Options menu items are shown to the user 
+#ifndef __SERIES60_30__    
+    if(AknLayoutUtils::MSKEnabled())
+        {        
+        Cba()->MakeCommandVisible(ECSXHDummyMSK,EFalse);
+        Cba()->DrawDeferred();
+        }
+#endif 
+    }
+                             
+void CCSXHLegacyTopicView::DoDeactivate()                             
+    {
+    if(iTopicContainer)
+        {
+        iTopicContainer->MakeVisible(EFalse);
+        AppUi()->RemoveFromStack(iTopicContainer);
+        delete iTopicContainer;
+        iTopicContainer = NULL;
+        }
+    }
+// --------------------------------------------------------------------------
+// When a view which was previously activated, goes to background and gets
+// activated again, the DoActivateL will not be called only ViewActivatedL 
+// will be called. Special handling is required for the context view for the
+// scenario, open context help from any application, with out changing the 
+// help view, open context help from another application, the contents of the
+// context view has to be refreshed with the new topic
+// --------------------------------------------------------------------------
+void CCSXHLegacyTopicView::ViewActivatedL(const TVwsViewId& aPrevViewId,
+                                 TUid aCustomMessageId,
+                                 const TDesC8& aCustomMessage)
+    {
+    if(iTopicContainer && iUid == KCSXHContextLegacyTopicViewID)
+        {
+        CCSXHDocument* doc = static_cast<CCSXHDocument*>(AppUi()->Document());
+        
+        if(doc->GetDisplayTopic()->GetViewID() == KCSXHContextLegacyTopicViewID)
+            {
+            CCSXHContextTopic* topic = STATIC_CAST(CCSXHContextTopic*,doc->GetDisplayTopic());
+            doc->SetDisplayTopic(topic->GetTopic());
+            CCSXHLegacyTOC2* displayTopic = STATIC_CAST(CCSXHLegacyTOC2*,doc->GetDisplayTopic());
+            iTopicContainer->RefreshL(displayTopic);    
+            }
+        
+         //Set the title of the view
+        CEikStatusPane* sp = StatusPane();
+        CAknTitlePane* title = STATIC_CAST(CAknTitlePane*, 
+            sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle)));
+        title->SetTextL(doc->GetDisplayTopic()->GetName());
+        }
+        
+    CAknView::ViewActivatedL(aPrevViewId,aCustomMessageId,aCustomMessage);
+    }
+void CCSXHLegacyTopicView::ViewDeactivated()
+    {
+    CAknView::ViewDeactivated();
+    }
+void CCSXHLegacyTopicView::ResourceChangeHdl(TInt aType)
+    {
+    if(iTopicContainer)
+        iTopicContainer->HandleResourceChangeImpl(aType);
+    }
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/csxhelp/src/csxhruntimeappwatcher.cpp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  CCSXHRuntimeAppWatcher class definition
+*
+*/
+
+
+#include "csxhruntimeappwatcher.h"
+#include "csxhconstants.h"
+
+// ========================================================================
+// CCSXHRuntimeAppWatcher
+// ========================================================================
+//
+CCSXHRuntimeAppWatcher::CCSXHRuntimeAppWatcher()
+                         : CActive( CActive::EPriorityIdle )
+    {
+    }
+    
+CCSXHRuntimeAppWatcher::~CCSXHRuntimeAppWatcher()
+    {
+    if ( IsActive() )
+        Cancel();
+    iFileSession.Close();
+    }
+    
+CCSXHRuntimeAppWatcher* CCSXHRuntimeAppWatcher::NewL()
+    {
+    CCSXHRuntimeAppWatcher* self = new ( ELeave ) CCSXHRuntimeAppWatcher();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+    
+void CCSXHRuntimeAppWatcher::ConstructL()
+    {
+    CActiveScheduler::Add( this );
+    User::LeaveIfError( iFileSession.Connect() );
+    }
+    
+void CCSXHRuntimeAppWatcher::RunL()
+    {
+    // iStatus equals to KErrNone means completion
+    //
+    if ( iStatus == KErrNone )
+        {
+        iObserver->RuntimeUpdateIndex();
+        Start();
+        }
+        
+    }
+    
+void CCSXHRuntimeAppWatcher::DoCancel()
+    {
+    iFileSession.NotifyChangeCancel( iStatus );
+    }
+    
+void CCSXHRuntimeAppWatcher::Start()
+    {
+    // Requests a notification of change to files or directories
+    // Addition or deletion of a directory entry, or changing or formatting a disk
+    //
+    TBuf<KMaxFileName> obsrvPath;
+    obsrvPath.Append( TChar('?') );
+    obsrvPath.Append( KInstallPath );
+    iFileSession.NotifyChange( ENotifyEntry, iStatus, obsrvPath );
+    
+    // starts
+    SetActive();
+    }
+    
+void CCSXHRuntimeAppWatcher::SetObserver( MInstallationObserver* aObserver )
+    {
+    iObserver = aObserver;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/group/bld.inf	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,18 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "../csxhelp/group/bld.inf"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/helps_info/helps_metadata/helps_metadata.mrp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,22 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+component           helps_metadata
+source   \sf\app\helps\helps_info\helps_metadata 
+source   \sf\app\helps\package_definition.xml
+source   \sf\app\helps\distribution.policy.s60
+notes_source      \component_defs\release.src
+ipr T 
--- a/layers.sysdef.xml	Tue Aug 31 15:06:12 2010 +0300
+++ b/layers.sysdef.xml	Wed Sep 01 12:30:56 2010 +0100
@@ -1,16 +1,13 @@
 <?xml version="1.0"?>
-<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_5_1.dtd" [
+<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_4_0.dtd" [
   <!ENTITY layer_real_source_path "sf/app/helps" >
 ]>
 
-<SystemDefinition name="helps" schema="1.5.1">
+<SystemDefinition name="helps" schema="1.4.0">
   <systemModel>
     <layer name="app_layer">
       <module name="helps">
-        <unit name="helps" unitID="abs.helps" bldFile="&layer_real_source_path;/userguide" mrp="" proFile="Userguide.pro" />
-      </module>
-      <module name="symhelp">
-        <unit name="symhelp" unitID="abs.symhelp" bldFile="&layer_real_source_path;/symhelp/helpmodel/group" mrp="" />
+        <unit unitID="abs.helps" mrp="" bldFile="&layer_real_source_path;/group" name="helps" />
       </module>
     </layer>
   </systemModel>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_definition.xml	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<SystemDefinition schema="3.0.0">
+  <package id="helps" name="Help Apps" levels="eng tools if ui">
+    <collection id="csxhelp" name="Context Sensitive Extended Help" level="if">
+      <component id="aiwhelpprovider" filter="s60" name="AIW Help Provider" class="plugin">
+        <!-- <unit bldFile="csxhelp/aiwhelpprovider/group"/> -->
+      </component>
+      <component id="csxhelp_build" filter="s60" name="Context Sensitive Extended Help Build">
+        <unit bldFile="csxhelp/group"/>
+      </component>
+    </collection>
+    <collection id="symhelp" name="Symbian Help" level="eng">
+      <component id="helpmodel" name="Help" introduced="6.0" purpose="optional">
+        <unit bldFile="symhelp/helpmodel/group" mrp="symhelp/helpmodel/group/app-services_hlpmodel.mrp"/>
+      </component>
+    </collection>
+    <collection id="helps_info" name="Help Apps Info" level="ui">
+      <component id="helps_metadata" name="Help Apps Metadata" class="config" introduced="^2" purpose="development" target="desktop">
+        <unit mrp="helps_info/helps_metadata/helps_metadata.mrp"/>
+      </component>
+    </collection>
+  </package>
+</SystemDefinition>
Binary file symhelp/helpmodel/TestData/Source/ER5Help/General/Symbols page.mbm has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symhelp/helpmodel/TestData/Source/ER5Help/epochlp.alp.tmp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!DOCTYPE cshproj PUBLIC "/EPOC32/tools/cshlpcmp/dtd/CSHproj.dtd" "SYSTEM">
+<?xml:stylesheet href="/EPOC32/tools/cshlpcmp/xsl/CSHproj.xsl" title="CS-Help project" type="text/xsl"?>
+<cshproj>
+  <helpfileUID>0x10006000</helpfileUID>
+  <directories>
+    <input>\work\help\</input>
+    <output>\epoc32\wins\c\system\help\</output>
+    <graphics>\work\help\</graphics>
+    <working>\work\help\temp\</working>
+  </directories>
+  <files>
+    <source>
+      <file>agen-hlp.rtf</file>
+      <file>bomb-hlp.rtf</file>
+      <file>calc-hlp.rtf</file>
+      <file>comm-hlp.rtf</file>
+      <file>cont-hlp.rtf</file>
+      <file>data-hlp.rtf</file>
+      <file>dial-hlp.rtf</file>
+      <file>dict-hlp.rtf</file>
+      <file>gen--hlp.rtf</file>
+      <file>hard-hlp.rtf</file>
+      <file>jott-hlp.rtf</file>
+      <file>prog-hlp.rtf</file>
+      <file>rec--hlp.rtf</file>
+      <file>shet-hlp.rtf</file>
+      <file>sket-hlp.rtf</file>
+      <file>spel-hlp.rtf</file>
+      <file>syst-hlp.rtf</file>
+      <file>time-hlp.rtf</file>
+      <file>word-hlp.rtf</file>
+      <file>xtra-hlp.rtf</file>
+    </source>
+    <destination>EPOCHlp</destination>
+    <customization>\work\help\uk.alc.xml</customization>
+  </files>
+</cshproj>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symhelp/helpmodel/TestData/Source/ER5Help/epochlp.alp.xml.bak	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!DOCTYPE cshproj PUBLIC "/EPOC32/tools/cshlpcmp/dtd/CSHproj.dtd" "SYSTEM">
+<?xml:stylesheet href="/EPOC32/tools/cshlpcmp/xsl/CSHproj.xsl" title="CS-Help project" type="text/xsl"?>
+<cshproj>
+  <helpfileUID>0x10006000</helpfileUID>
+  <directories>
+    <input>H:\aleppo\work\help\</input>
+    <output>H:\epoc32\wins\c\system\help\</output>
+    <graphics>H:\aleppo\work\help\</graphics>
+    <working>H:\aleppo\work\help\temp\</working>
+  </directories>
+  <files>
+    <source>
+      <file>sket-hlp.rtf</file>
+    </source>
+    <destination>EPOCHlp</destination>
+    <customization>H:\aleppo\work\help\uk.alc.xml</customization>
+  </files>
+</cshproj>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symhelp/helpmodel/TestData/Source/ER5Help/epochlp.tmp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,8 @@
+inputdirectory c:\aleppo\work\help\
+outputdirectory c:\epoc32\wins\c\documents\
+outputfile EPOCHlp
+sourcefile agen-hlp bomb-hlp calc-hlp comm-hlp cont-hlp data-hlp dial-hlp dict-hlp gen--hlp hard-hlp jott-hlp prog-hlp rec--hlp shet-hlp sket-hlp spel-hlp syst-hlp time-hlp word-hlp xtra-hlp
+orderfile EPOCHlp.order
+graphicsdirectory c:\aleppo\work\help\
+workingdirectory c:\aleppo\work\help\temp\
+customizationfile c:\aleppo\work\help\uk.alc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symhelp/helpmodel/TestData/Source/ER5Help/uk.alc.tmp	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE cshcust PUBLIC "/EPOC32/tools/cshlpcmp/dtd/CSHcush.dtd" "SYSTEM">
+<?xml:stylesheet href="/EPOC32/tools/cshlpcmp/xsl/CSHcust.xsl" title="CS-Help customisation" type="text/xsl"?>
+<cshcust>
+<bodystyle fontstyle="sansserif" size="10"/>
+<titlestyle fontstyle="sansserif" size="14"/>
+<listbullet1style bulletchar="149"></listbullet1style>
+<listbullet2style bulletchar="45"></listbullet2style>
+<tipeffects leftindent="36"><b>Tip:</b></tipeffects>
+<noteeffects leftindent="36"><b>Note:</b></noteeffects>
+<importanteffects leftindent="60"><b>Important:</b></importanteffects>
+</cshcust>
Binary file symhelp/helpmodel/documentation/HLPMODEL test code.rtf has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysdef_1_4_0.dtd	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,86 @@
+ <!ELEMENT SystemDefinition (systemModel?, build?)>
+ <!ATTLIST SystemDefinition
+  name CDATA #REQUIRED
+  schema CDATA #REQUIRED>
+ <!ELEMENT systemModel (layer+)>
+ <!ELEMENT layer (logicalset* | module*)*>
+ <!ATTLIST layer
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED
+  span CDATA #IMPLIED>
+ <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalset name CDATA #REQUIRED>
+ <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalsubset name CDATA #REQUIRED>
+ <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
+ <!ATTLIST module
+  name CDATA #REQUIRED
+  level CDATA #IMPLIED>
+ <!ELEMENT component (unit* | package* | prebuilt*)*>
+ <!ATTLIST component name CDATA #REQUIRED>
+ <!ELEMENT unit EMPTY>
+ <!ATTLIST unit
+  unitID ID #REQUIRED
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  bldFile CDATA #REQUIRED
+  priority CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT package EMPTY>
+ <!ATTLIST package
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT prebuilt EMPTY>
+ <!ATTLIST prebuilt
+  name CDATA #REQUIRED
+  version CDATA #REQUIRED
+  late (Y|N) #IMPLIED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
+ <!ELEMENT unitList (unitRef+)>
+ <!ATTLIST unitList
+  name ID #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT unitRef EMPTY>
+ <!ATTLIST unitRef unit IDREF #REQUIRED>
+ <!ELEMENT targetList EMPTY>
+ <!ATTLIST targetList
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  target IDREFS #REQUIRED>
+ <!ELEMENT target EMPTY>
+ <!ATTLIST target
+  name ID #REQUIRED
+  abldTarget CDATA #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option
+  name ID #REQUIRED
+  abldOption CDATA #REQUIRED
+  description CDATA #REQUIRED
+  enable (Y | N | y | n) #REQUIRED>
+ <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
+ <!ATTLIST configuration
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  filter CDATA #REQUIRED>
+ <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
+ <!ELEMENT unitListRef EMPTY>
+ <!ATTLIST unitListRef unitList IDREF #REQUIRED>
+ <!ELEMENT layerRef EMPTY>
+ <!ATTLIST layerRef layerName CDATA #REQUIRED>
+ <!ELEMENT buildLayer EMPTY>
+ <!ATTLIST buildLayer
+  command CDATA #REQUIRED
+  targetList IDREFS #IMPLIED
+  unitParallel (Y | N | y | n) #REQUIRED
+  targetParallel (Y | N | y | n) #IMPLIED>
+ <!ELEMENT specialInstructions EMPTY>
+ <!ATTLIST specialInstructions
+  name CDATA #REQUIRED
+  cwd CDATA #REQUIRED
+  command CDATA #REQUIRED>  
--- a/sysdef_1_5_1.dtd	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
- <!ELEMENT SystemDefinition (systemModel?, build?)>
- <!ATTLIST SystemDefinition
-  name CDATA #REQUIRED
-  schema CDATA #REQUIRED>
- <!ELEMENT systemModel (layer+)>
- <!ELEMENT layer (logicalset* | module*)*>
- <!ATTLIST layer
-  name CDATA #REQUIRED
-  levels CDATA #IMPLIED
-  span CDATA #IMPLIED>
- <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalset name CDATA #REQUIRED>
- <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalsubset name CDATA #REQUIRED>
- <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
- <!ATTLIST module
-  name CDATA #REQUIRED
-  level CDATA #IMPLIED>
- <!ELEMENT component (unit* | package* | prebuilt*)*>
- <!ATTLIST component name CDATA #REQUIRED>
- <!ELEMENT unit EMPTY>
- <!ATTLIST unit
-  unitID ID #REQUIRED
-  name CDATA #REQUIRED
-  mrp CDATA #REQUIRED
-  filter CDATA #IMPLIED
-  bldFile CDATA #REQUIRED
-  priority CDATA #IMPLIED
-  contract CDATA #IMPLIED
-  proFile CDATA #IMPLIED
-  qmakeArgs CDATA #IMPLIED>
- <!ELEMENT package EMPTY>
- <!ATTLIST package
-  name CDATA #REQUIRED
-  mrp CDATA #REQUIRED
-  filter CDATA #IMPLIED
-  contract CDATA #IMPLIED>
- <!ELEMENT prebuilt EMPTY>
- <!ATTLIST prebuilt
-  name CDATA #REQUIRED
-  version CDATA #REQUIRED
-  late (Y|N) #IMPLIED
-  filter CDATA #IMPLIED
-  contract CDATA #IMPLIED>
- <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
- <!ELEMENT unitList (unitRef+)>
- <!ATTLIST unitList
-  name ID #REQUIRED
-  description CDATA #REQUIRED>
- <!ELEMENT unitRef EMPTY>
- <!ATTLIST unitRef unit IDREF #REQUIRED>
- <!ELEMENT targetList EMPTY>
- <!ATTLIST targetList
-  name ID #REQUIRED
-  description CDATA #REQUIRED
-  target IDREFS #REQUIRED>
- <!ELEMENT target EMPTY>
- <!ATTLIST target
-  name ID #REQUIRED
-  abldTarget CDATA #REQUIRED
-  description CDATA #REQUIRED>
- <!ELEMENT option EMPTY>
- <!ATTLIST option
-  name ID #REQUIRED
-  abldOption CDATA #REQUIRED
-  description CDATA #REQUIRED
-  enable (Y | N | y | n) #REQUIRED>
- <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
- <!ATTLIST configuration
-  name ID #REQUIRED
-  description CDATA #REQUIRED
-  filter CDATA #REQUIRED>
- <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
- <!ELEMENT unitListRef EMPTY>
- <!ATTLIST unitListRef unitList IDREF #REQUIRED>
- <!ELEMENT layerRef EMPTY>
- <!ATTLIST layerRef layerName CDATA #REQUIRED>
- <!ELEMENT buildLayer EMPTY>
- <!ATTLIST buildLayer
-  command CDATA #REQUIRED
-  targetList IDREFS #IMPLIED
-  unitParallel (Y | N | y | n) #REQUIRED
-  targetParallel (Y | N | y | n) #IMPLIED>
- <!ELEMENT specialInstructions EMPTY>
- <!ATTLIST specialInstructions
-  name CDATA #REQUIRED
-  cwd CDATA #REQUIRED
-  command CDATA #REQUIRED>  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/systemDefinition.xml	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!DOCTYPE SystemDefinition SYSTEM "systemDefinition.dtd"[
+
+ 	<!ENTITY layer_real_source_path "\sf\app\helps">
+ 	<!ENTITY layer_name "helps">
+
+ 	<!ENTITY layer_file SYSTEM "systemDefinitionLayer.xml">
+ 	<!ENTITY targetDefinition_file SYSTEM "/epoc32/tools/systemDefinition/targetDefinition.xml">
+ 	<!ENTITY defaultbuild_file SYSTEM "/epoc32/tools/systemDefinition/default_build.xml">
+ 	<!ENTITY defaultclean_file SYSTEM "/epoc32/tools/systemDefinition/default_clean.xml">
+]>
+
+<SystemDefinition name="SystemDefinition" schema="1.4.0">
+  <systemModel>
+&layer_file;
+  </systemModel>
+  <build>
+&targetDefinition_file;
+
+		<configuration name="build" description="build layer" filter="">
+    	<layerRef layerName="&layer_name;"/>
+
+&defaultbuild_file;
+    </configuration>
+
+		<configuration name="clean" description="clean layer" filter="">
+    	<layerRef layerName="&layer_name;"/>
+
+&defaultclean_file;
+    </configuration>
+
+  </build>
+</SystemDefinition>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/systemDefinitionLayer.xml	Wed Sep 01 12:30:56 2010 +0100
@@ -0,0 +1,7 @@
+<layer name="helps">
+  <module name="group_helps">
+    <component name="group_helps">
+      <unit unitID="helps" mrp="" bldFile="&layer_real_source_path;\group" name="helps" />
+    </component>
+  </module>
+</layer>
--- a/userguide/Userguide.pro	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-TEMPLATE    = app
-QT	    += webkit xmlpatterns
-CONFIG      += hb 
-TRANSLATIONS = userguide.ts common.ts
-#add "precompile_header" to CONFIG
-
-TARGET = Userguide
-DEPENDPATH  += .
-INCLUDEPATH += ./inc
-
-# PRECOMPILED_HEADER = pch.h
-
-# Input
-HEADERS += 	inc/HelpMainWindow.h \
-			inc/BrowserWrapper.h \
-			inc/HelpContentsView.h \
-			inc/HelpCategoryView.h \
-			inc/HelpDocumentLoader.h \
-			inc/HelpCommon.h \
-			inc/HelpDataProvider.h \
-			inc/HelpUtils.h \
-			inc/HelpProxyModel.h \
-			inc/HelpStandardItem.h \
-			inc/HelpKeywordView.h \
-			inc/HelpBaseView.h
-
-SOURCES += 	src/main.cpp \
-			src/HelpMainWindow.cpp \
-			src/BrowserWrapper.cpp \
-			src/HelpContentsView.cpp \
-			src/HelpCategoryView.cpp \
-			src/HelpDocumentLoader.cpp \
-			src/HelpDataProvider.cpp \
-			src/HelpUtils.cpp \
-			src/HelpProxyModel.cpp \
-			src/HelpStandardItem.cpp \
-			src/HelpKeywordView.cpp \
-			src/HelpBaseView.cpp
-
-symbian {
-
-		TARGET.UID3 = 0x10005234
-  	TARGET.CAPABILITY = CAP_APPLICATION
-  	TARGET.EPOCHEAPSIZE = 0x020000 0x1000000
-
-    CONFIG += mobility
-    MOBILITY = systeminfo
-    INCLUDEPATH += /sf/mw/webruntime/wrt/runtimecore
-		INCLUDEPATH += /sf/mw/webruntime/wrt
-		DEFINES += CWRT_BUILDING_TENONE
-  	LIBS += -lRuntimeCore -lezip -lxqservice -lxqserviceutil -lcone -leikcore -lmediaclientaudio -leikcoctl -leiksrv -lapparc -lavkon -lefsrv -lcharconv -lws32 -lhal -lgdi -lapgrfx
-  	include(rom/userguide.pri)
-  	SKINICON = qtg_large_help
-}
-
-RESOURCES += resources/Userguide.qrc
-
-debug: DESTDIR = ./debug
-release: DESTDIR = ./release
--- a/userguide/inc/BrowserWrapper.h	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef BROWSERWRAPPER_H
-#define BROWSERWRAPPER_H
-
-#include <QStack>
-#include <QGraphicsWebView>
-
-#include <hbview.h>
-
-class BrowserWrapper : public HbView
-{
-    Q_OBJECT
-    
-public:
-    BrowserWrapper();
-	~BrowserWrapper();
-
-public:
-	void init();
-	
-public:
-	void setHtml(const QString& html, const QUrl& url);
-	void clearHistory();
-	bool canGoBack();
-	void back();
-	
-signals:
-    void linkClicked(const QUrl &url);
-    void urlChanged(const QUrl&);
-
-private:
-	QGraphicsWebView*      mWebView;
-	QStack<QUrl>   mHistory;
-	
-};
-
-#endif //MYTEXTBROWSER_H
--- a/userguide/inc/HelpBaseView.h	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef HELPBATHVIEW_H
-#define HELPBATHVIEW_H
-
-#include <hbview.h>
-
-#include "HelpCommon.h"
-#include "HelpDocumentLoader.h"
-
-class HbToolBar;
-
-class HelpBaseView : public HbView
-{
-	Q_OBJECT
-	
-public:
-	HelpBaseView();
-	~HelpBaseView();
-
-signals:
-    void activateView(HelpViewName viewName);
-
-signals: // from tollbar event
-    void showAllList();
-    void showFindList();
-
-private slots: // handle tollbar event
-    void onToolbarAll()		{ emit showAllList(); };
-    void onToolbarFind()	{ emit showFindList(); };
-    void onToolbarOnlineSupport();
-
-protected:
-	void initBaseDocMl();
-
-protected:
-	HelpUIBuilder	mBuilder;
-	HbToolBar*		mToolBar;
-};
-
-#endif //HELPBATHVIEW_H
--- a/userguide/inc/HelpCategoryView.h	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef HELPCATEGORYVIEW_H
-#define HELPCATEGORYVIEW_H
-
-#include <HelpBaseView.h>
-
-#include "HelpDocumentLoader.h"
-
-class HbTreeView;
-class QStandardItem;
-
-class HelpCategoryView : public HelpBaseView
-{
-	Q_OBJECT
-	
-public:
-	HelpCategoryView();
-	~HelpCategoryView();
-	void init();
-
-private:
-	void initDocMl();
-	void initAllList();
-
-private:
-	void expandCollapseAllList(QStandardItem* item, bool expand);
-	void updateExpandCollapseAction(bool expand);
-    
-private slots: // handle list event
-    void onAllListActivated(const QModelIndex& index);
-
-private slots: // handle menu event
-	void onExpandOrCollapseAll();
-
-private:
-	HbTreeView*	mListAll;
-	int			mExpandCount;
-};
-
-#endif //HELPCATEGORYVIEW_H
--- a/userguide/inc/HelpCommon.h	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef HELPCOMMON_H
-#define HELPCOMMON_H
-
-#include <Qt>
-
-//const
-const int APPPRIORITY = 2001;
-// words
-const char* const BACKSLASH = "/";
-const char* const SPECIALCHAR = "+";
-const char* const HASHMARK = "#";
-const char* const COLON = ":";
-// help content file name
-const char* const XHTMLPATH = "resource/xhtml/";
-const char* const CONTENTSZIP = "contents.zip";
-const char* const INDEXXML = "index.xml";
-const char* const KEYWORDXML = "keywords.xml";
-const char* const METAXML = "meta.xml";
-
-// path
-const char* const PATH_ROOT = "z:/";
-const char* const PATH_TRANSLATIONS = "Z:/resource/qt/translations/";
-
-// URL
-const char* const URL_HEADER_APP = "app://";
-const char* const URL_HEADER_HTTP = "http://";
-const char* const URL_HEADER_HTTPS = "https://";
-const char* const URL_HEADER_FTP = "ftp://";
-const char* const URL_HEADER_LOCAL = "file:///";
-const char* const URL_LINK_SUPPORT= "Link to Nokia.com/support";
-
-// text
-const char* const TXT_BUTTON_ALL = "txt_common_button_all";
-const char* const TXT_BUTTON_FIND = "txt_common_button_find";
-const char* const TXT_BUTTON_LINK_SUPPORT = "txt_user_guide_button_link_to_nokiacomsupport";
-const char* const TXT_SETLABEL_SEARCH = "txt_user_guide_setlabel_search";
-const char* const TXT_SETLABEL_SEARCH_RESULTS = "txt_user_guide_setlabel_search_results";
-const char* const TXT_APPLICATIONS = "txt_user_guide_list_applications";
-const char* const TXT_COLLAPSE_ALL = "txt_user_guide_opt_collapse_all";
-const char* const TXT_EXPAND_ALL = "txt_user_guide_opt_expand_all";
-
-// docml
-const char* const QRC_DOCML_BASE = ":/xml/baseView.docml";
-const char* const QRC_DOCML_CATEGORY = ":/xml/categoryView.docml";
-const char* const QRC_DOCML_KEYWORD = ":/xml/keywordView.docml";
-const char* const QRC_DOCML_CONTENTS = ":/xml/contentsView.docml";
-const char* const QRC_DOCML_TOOLBAR = ":/xml/toolbar.docml";
-const char* const DOCML_VIEW_NAME = "view_help";
-const char* const DOCML_ACTION_ALL = "action_all";
-const char* const DOCML_ACTION_SEARCH = "action_find";
-const char* const DOCML_ACTION_LINK_NOKIA = "action_online_support";
-const char* const DOCML_LIST_CATEGORY_ALL = "list_category_all";
-const char* const DOCML_LIST_SEARCH = "list_search";
-const char* const DOCML_SEARCH_PANEL = "search_panel";
-const char* const DOCML_TOOLBAR = "toolbar";
-const char* const DOCML_BROWSER_CONTENTS = "browser_contents";
-const char* const DOCML_BROWSER = "browser";
-const char* const DOCML_LAYOUT_SEARCH = "layout_find";
-const char* const DOCML_LAYOUT_SEARCH_NO_SRHPAL = "layout_find_no_searchpanel";
-const char* const DOCML_GROUPBOX = "groupBox";
-const char* const DOCML_LAYOUT_SEARCH_NO_MATCH = "layout_find_no_match";
-const char* const DOCML_LAYOUT_SEARCH_NO_SRHPAL_NO_MATCH = "layout_find_no_searchpanel_no_match";
-const char* const DOCML_NO_MATCH_LABEL = "no_match_label";
-const char* const DOCML_ACTION_EXPAND_COLLAPSE_ALL = "action_expand_collapse_all";
-
-
-// enum
-
-enum HelpViewName
-{
-    HelpViewCategory = 0,
-	HelpViewKeyword,
-    HelpViewContents,
-	PreviousView = 100
-};
-
-enum HelpItemRole
-{
-    UidRole = Qt::UserRole + 1,
-	PriorityRole,
-	HrefRole,
-    KeywordRole
-};
-
-#endif //HELPCOMMON_H
-
--- a/userguide/inc/HelpContentsView.h	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef HELPCONTENTSVIEW_H
-#define HELPCONTENTSVIEW_H
-
-#include <QUrl>
-
-#include <HelpBaseView.h>
-
-#include "HelpDocumentLoader.h"
-
-class BrowserWrapper;
-
-class HelpContentsView : public HelpBaseView
-{
-	Q_OBJECT
-	
-public:
-	HelpContentsView();
-	~HelpContentsView();
-	
-public:
-	void init();
-	
-private:
-	void initDocMl();
-    void initBackAction();	
- 
-private:
-	bool openApplication(const QUrl& url);
-	bool openExternalLink(const QUrl& url);
-	void openHelpContent(const QUrl& url=QUrl());
-
-private slots: // handle system event
-    void onViewReady();
-    
-private slots: // handle button action
-    void onBackAction();
-    
-private slots: // handle browser event
-	void onLinkClicked(const QUrl& url);
-	void onUrlChanged(const QUrl& url);
-
-private:
-    BrowserWrapper*     mBrowser;
-    HbAction* mSoftKeyAction;
-};
-
-#endif //HELPCONTENTSVIEW_H
--- a/userguide/inc/HelpDataProvider.h	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef HELPDATAPROVIDER_H
-#define HELPDATAPROVIDER_H
-
-class HelpModel;
-class HelpItems;
-class HelpProxyModel;
-class QStandardItemModel;
-class HelpStandardItem;
-
-class HelpDataProvider
-{	
-private:
-    HelpDataProvider();
-    ~HelpDataProvider();
-    
-public:
-    static HelpDataProvider* instance();
-    static void destroyInstance();
-
-public:
-	void createHelpCategory();
-	QAbstractItemModel* getCategoryData();
-	QAbstractItemModel* getSearchData(const QString& key=QString());
-	void setHelpContentUrl(const QString& uid, const QString& href);
-	void getHelpContentData(QString& content, QString& url);
-
-private:
-	//construct 1st category
-	void constructCategory();
-	//construct help category in rom
-	void constructBuiltInCategory(const QString& path, const QStringList& uidList, const QStringList& titleList);
-	//construct help category for 3rd party application
-	void constructAppCategory(const QString& path, QStringList& uidList);
-	void constructBuiltInCategoryItem(const QString& uid, const QString& title);
-
-	//construct 2nd category
-	void constructCategory2(HelpStandardItem* itemParent);
-	void constructCategory2Item(HelpStandardItem* itemParent);
-
-	//construct keyword list
-	void constructKeywordModel(const QString& title, const QString& uid, const QString& href);
-
-	//parse xml
-	void parseCategoryIndexXml(const QString& path, QStringList& uidList, QStringList& titleList);
-	void parseCategory2IndexXml(const QString& path, QStringList& hrefList, QStringList& titleList);
-	void parseBuiltInMetaxml(const QString& path, int& priority);
-	void parseAppMetaxml(const QString& path, QString& title);	
-
-private:
-	QStandardItemModel*		mHelpModel;         //category tree model
-	QStandardItemModel*		mKeywordModel;      //keyword list model
-	HelpProxyModel*			mSearhResultModel;  //search result proxy model of keyword model	
-	HelpStandardItem*		mAppItem;
-	QString					mHelpContentRoot;
-	QString					mLastSrhKey;
-	QStringList				mUpdateUidList;
-
-};
-
-#endif //HELPDATAPROVIDER_H
--- a/userguide/inc/HelpDocumentLoader.h	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef HELPDOCUMENTLOADER_H
-#define HELPDOCUMENTLOADER_H
-
-#include <hbdocumentloader.h>
-
-class HelpDocumentLoader : public HbDocumentLoader
-{
-private:
-    virtual QObject* createObject(const QString& type, const QString& name);
-};
-
-class HelpUIBuilder
-{
-public:
-	void setObjectTree(QObjectList roots);
-    QObjectList load(const QString& fileName);
-    QObjectList load(const QString& fileName, const QString& section);
-    QGraphicsWidget* findWidget(const QString& name);
-    QObject* findObject(const QString& name);
-
-public:
-    template<class T> T findWidget(const QString& name) { return qobject_cast<T>(findWidget(name)); }
-    template<class T> T findObject(const QString& name) { return qobject_cast<T>(findObject(name)); }
-    
-private:
-    HelpDocumentLoader mDocLoader;
-};
-
-
-#endif //HELPDOCUMENTLOADER_H
--- a/userguide/inc/HelpKeywordView.h	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef HELPKEYWORDVIEW_H
-#define HELPKEYWORDVIEW_H
-
-#include <HelpBaseView.h>
-
-#include "HelpDocumentLoader.h"
-
-class HbListView;
-class HbSearchPanel;
-class HbStaticVkbHost;
-class HbLabel;
-
-class HelpKeywordView : public HelpBaseView
-{
-	Q_OBJECT
-	
-public:
-	HelpKeywordView();
-	~HelpKeywordView();
-	void init();
-	void loadAllContent();
-
-private:
-	void initDocMl();
-	void initSearchList();
-	void initSearchPanel();
-	void initBackAction();
-	void initVirtualKeyboard();
-
-private:
-	HbLabel* label();
-    
-private:
-	void updateVisibleItems(bool visible);
-	void ResetSearchPanel();	
-	void updateLabelPos();
-	void showToolBar(bool visible);
-
-private slots:
-	void onOrientationChanged(Qt::Orientation orientation);
-
-private slots: // handle system event
-    void onViewReady();
-
-private slots: // handle button action
-    void onBackAction();
-    
-private slots: // handle list event
-    void onSearchListActivated(const QModelIndex& index);
-
-private slots: // handle search panel event
-	void onSearchPanelExitClicked();
-	void onSearchPanelCriteriaChanged(const QString &criteria);
-
-private slots: // handle virtual keyboard event
-    void onHandleKeypadOpen();
-    void onHandleKeypadClose();
-
-private:
-	HbListView*			mListSearch;
-	HbSearchPanel*		mSearchPanel;
-	HbAction*			mSoftKeyAction;
-	HbStaticVkbHost*	mVirtualKeyboard;
-};
-
-#endif //HELPKEYWORDVIEW_H
--- a/userguide/inc/HelpMainWindow.h	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef HELPMAINWINDOW_H
-#define HELPMAINWINDOW_H
-
-#include <hbmainwindow.h>
-
-#include "HelpCommon.h"
-#include "HelpDocumentLoader.h"
-
-class HelpBaseView;
-class HelpCategoryView;
-class HelpKeywordView;
-class HelpContentsView;
-
-class HelpMainWindow : public HbMainWindow
-{
-	Q_OBJECT
-
-public:
-	HelpMainWindow();
-	~HelpMainWindow();
-
-private slots:
-    void onActivateView(HelpViewName viewName);
-    void saveActivity();
-
-private: // activate views
-	void activateCategoryView();
-	void activateKeywordView();
-	void activateContentsView();
-	
-private:
-	void connectViewSignal(const HelpBaseView *view);
-
-private slots: // handle view event
-    void onShowAllList();
-    void onShowFindList();
-
-private:
-	HelpCategoryView* mCategoryView;
-	HelpKeywordView* mKeywordView;
-	HelpContentsView* mContentsView;
-	HelpViewName mPreviousViewName;
-};
-
-#endif //HELPMAINWINDOW_H
--- a/userguide/inc/HelpProxyModel.h	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef HELPPROXYMODEL_H
-#define HELPPROXYMODEL_H
-
-#include <QSortFilterProxyModel>
-
-class HelpProxyModel : public QSortFilterProxyModel
-{
-	Q_OBJECT
-public:
-	HelpProxyModel(QObject * parent = 0);
-	~HelpProxyModel();
-
-protected:
-    bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
-};
-
-#endif //HELPPROXYMODEL_H
--- a/userguide/inc/HelpStandardItem.h	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef HELPSTANDARDITEM_H
-#define HELPSTANDARDITEM_H
-
-#include <QStandardItem>
-
-class HelpStandardItem : public QStandardItem
-{
-public:
-	HelpStandardItem(const QString& text);
-	~HelpStandardItem();
-	bool operator<(const QStandardItem & other) const;
-};
-
-#endif //HELPSTANDARDITEM_H
-
--- a/userguide/inc/HelpUtils.h	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#ifndef HELPUTILS_H
-#define HELPUTILS_H
-
-#include <QString>
-
-class HelpUtils
-{
-public:
-	static void loadHtmlFromZipFile(const QString& path, const QString& htmlFile, QString& htmlContent);
-	static int launchApplication(const QString& appUid);
-	static bool suppportFeatureID(int featureID);
-	static QString rootPath();
-	static QString UILocaleFromQtToSymbian();
-	static Qt::Orientation defaultOrientation();
-	static Qt::SortOrder sortOrder();
-	static int findStr(const QString& strFrom, const QString& strToFind);
-	static int compareStr(const QString& str1, const QString& str2);
-};
-
-#endif //HELPUTILS_H
--- a/userguide/resources/Userguide.qrc	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<RCC>
-
-	<qresource prefix="/xml">
-		<file alias="categoryView.docml">xml/categoryView.docml</file>
-		<file alias="keywordView.docml">xml/keywordView.docml</file>		
-		<file alias="contentsView.docml">xml/contentsView.docml</file>
-    <file alias="baseView.docml">xml/baseView.docml</file>    
-  </qresource>
-</RCC>
\ No newline at end of file
--- a/userguide/resources/images/qtg_mono_link_nokia.svg	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In  -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
-	<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
-]>
-<svg version="1.1"
-	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
-	 x="0px" y="0px" width="30px" height="30px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve">
-<defs>
-</defs>
-<path d="M15,5c5.514,0,10,4.486,10,10s-4.486,10-10,10S5,20.514,5,15S9.486,5,15,5 M15,2C7.821,2,2,7.821,2,15s5.821,13,13,13
-	s13-5.821,13-13S22.179,2,15,2L15,2z"/>
-<path d="M16.851,23h-3.315v-9.857h-1.139v-1.888h4.454V23z M15.192,10.036c-0.539,0-0.974-0.135-1.303-0.404
-	c-0.33-0.27-0.495-0.642-0.495-1.113c0-0.467,0.162-0.836,0.484-1.109C14.202,7.137,14.641,7,15.192,7
-	c0.526,0,0.959,0.138,1.299,0.414C16.83,7.691,17,8.059,17,8.519c0,0.472-0.164,0.844-0.494,1.113
-	C16.177,9.901,15.739,10.036,15.192,10.036z"/>
-<rect fill="none" width="30" height="30"/>
-</svg>
--- a/userguide/resources/images/qtg_mono_search.svg	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg baseProfile="tiny" height="40px" version="1.1" viewBox="0 0 40 40" width="40px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
-<rect fill="none" fill-opacity="0.5" height="40" stroke-opacity="0.5" width="40"/>
-<rect height="2" transform="matrix(-0.7071 -0.7071 0.7071 -0.7071 -15.7259 63.0843)" width="6" x="2.201" y="33.799"/>
-<path d="M34.192,5.807c-5.077-5.076-13.308-5.076-18.385,0c-4.594,4.595-5.016,11.766-1.294,16.851l-2.241,2.24l-0.707-0.707  l-6.364,6.364l4.243,4.243l6.364-6.364l-0.707-0.707l2.241-2.241c5.085,3.721,12.256,3.299,16.851-1.295  C39.27,19.115,39.269,10.883,34.192,5.807z M31.364,21.363c-3.51,3.508-9.22,3.509-12.728,0C16.937,19.664,16,17.403,16,15  c0-2.405,0.937-4.665,2.636-6.365c3.508-3.508,9.219-3.508,12.728,0C34.873,12.145,34.873,17.854,31.364,21.363z"/>
-</svg>
--- a/userguide/resources/images/qtg_mono_show_all.svg	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In  -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
-	<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
-]>
-<svg version="1.1"
-	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
-	 x="0px" y="0px" width="30px" height="30px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve">
-<defs>
-</defs>
-<rect x="8" y="11" width="2" height="2"/>
-<rect x="11.059" y="11" width="8.941" height="2"/>
-<rect x="8" y="6" width="2" height="2"/>
-<rect x="11.059" y="6" width="8.941" height="2"/>
-<polygon points="8,25 5,25 5,3 23,3 23,13 26,13 26,0 2,0 2,28 8,28 "/>
-<path d="M26,17v11H12V17H26 M28,15H10v15h18V15L28,15z"/>
-<rect x="14" y="19" width="10" height="1"/>
-<rect x="14" y="22" width="10" height="1"/>
-<rect x="14" y="25" width="10" height="1"/>
-<rect fill="none" width="30" height="30"/>
-</svg>
--- a/userguide/resources/xml/baseView.docml	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
-  <object name="help_config" type="QObject">
-	  <object name="action_all" type="HbAction">
-		  <icon name="icon" iconName="qtg_mono_help_all" />
-	  </object>
-	  <object name="action_find" type="HbAction">
-		  <icon name="icon" iconName="qtg_mono_search" />
-	  </object>
-    <object name="action_online_support" type="HbAction">
-      <icon name="icon" iconName="qtg_mono_online_support" />
-    </object>
-  </object>
-
-  <widget name="view_help" type="HbView">
-    <widget name="toolbar" type="HbToolBar" role="HbView:toolBar">
-      <ref object="action_all" role="HbToolBar:addAction" />
-      <ref object="action_find" role="HbToolBar:addAction" />
-      <ref object="action_online_support" role="HbToolBar:addAction" />
-    </widget>
-  </widget>
-
-  <connect sender="action_all" signal="triggered(bool)" receiver="view_help" slot="onToolbarAll()" />
-  <connect sender="action_find" signal="triggered(bool)" receiver="view_help" slot="onToolbarFind()" />
-  <connect sender="action_online_support" signal="triggered(bool)" receiver="view_help" slot="onToolbarOnlineSupport()" />
-  
-</hbdocument>
\ No newline at end of file
--- a/userguide/resources/xml/categoryView.docml	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
-    <object name="action_expand_collapse_all" type="HbAction">
-        <string locid="txt_user_guide_opt_expand_all" name="text" value="Action01"/>
-    </object>
-  
-    <widget name="view_help" type="HbView">
-        <widget name="content" role="HbView:widget" type="HbWidget">
-            <widget name="list_category_all" type="HbTreeView">
-                <widget name="treeItemPrototype" role="HbAbstractView:prototype" type="HbTreeViewItem"/>
-                <sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
-            </widget>
-            <real name="z" value="0"/>
-            <layout orientation="Vertical" type="linear">
-                <contentsmargins bottom="0px" left="0px" right="0px" top="0px"/>
-                <linearitem itemname="list_category_all"/>
-            </layout>
-        </widget>
-        <widget name="menu" type="HbMenu" role="HbView:menu">
-            <ref object="action_expand_collapse_all" role="HbMenu:addAction" />
-        </widget>
-        <string locid="txt_user_guide_title_user_guide" name="title" value="View"/>
-    </widget>
-
-  <connect sender="action_expand_collapse_all" signal="triggered(bool)" receiver="view_help" slot="onExpandOrCollapseAll()" />
-  
-</hbdocument>
--- a/userguide/resources/xml/contentsView.docml	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.0">
-  
-    <widget name="view_help" type="HbView">
-        <widget name="content" role="HbView:widget" type="HbWidget">
-            <widget name="browser_contents" type="BrowserWrapper">      
-                <sizehint height="47.7612un" type="PREFERRED" width="35.8209un"/>
-                <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
-            </widget>
-            <real name="z" value="0"/>
-            <layout orientation="Vertical" type="linear">
-                <contentsmargins bottom="0px" left="0px" right="0px" top="0px"/>
-                <linearitem itemname="browser_contents"/>
-            </layout>
-        </widget>
-        <string locid="txt_user_guide_title_user_guide" name="title" value="View"/>
-    </widget>
-  
-</hbdocument>
--- a/userguide/resources/xml/keywordView.docml	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.1">
-  <widget name="view_help" type="HbView">
-    <widget name="content" role="HbView:widget" type="HbWidget">
-      <widget name="list_search" type="HbListView">
-        <widget name="listItemPrototype" role="HbAbstractView:prototype" type="HbListViewItem"/>
-        <sizehint height="85.52239un" type="PREFERRED" width="45.8209un"/>
-        <rect height="63.20149un" name="geometry" width="51.04478un" x="1.64179un" y="11.79105un"/>
-        <bool name="visible" value="FALSE"/>
-      </widget>
-      <widget name="search_panel" type="HbSearchPanel">
-        <rect height="9.3806un" name="geometry" width="51.04478un" x="1.79104un" y="75.22388un"/>
-        <bool name="visible" value="FALSE"/>
-      </widget>
-      <widget name="no_match_label" type="HbLabel">
-        <real name="z" value="1"/>
-        <string locid="txt_user_guide_list_no_match_found" name="plainText" value="Label"/>
-        <enums name="alignment" value="AlignTop|AlignHCenter"/>
-        <fontspec name="fontSpec" role="Primary" textheight="26.8"/>
-        <bool name="visible" value="FALSE"/>
-      </widget>
-    </widget>
-    <string locid="txt_user_guide_title_user_guide" name="title" value="View"/>
-  </widget>
-  <section name="layout_find">
-    <widget name="list_search" type="HbListView">
-      <bool name="visible" value="TRUE"/>
-    </widget>
-    <widget name="content" role="HbView:widget" type="HbWidget">
-      <layout orientation="Vertical" type="linear">
-        <linearitem itemname="list_search"/>
-        <linearitem itemname="search_panel"/>
-      </layout>
-    </widget>
-    <widget name="search_panel" type="HbSearchPanel">
-      <bool name="visible" value="TRUE"/>
-    </widget>
-    <widget name="no_match_label" type="HbLabel">
-      <bool name="visible" value="FALSE"/>
-    </widget>
-  </section>
-  <section name="layout_find_no_searchpanel">
-    <widget name="list_search" type="HbListView">
-      <bool name="visible" value="TRUE"/>
-    </widget>
-    <widget name="content" role="HbView:widget" type="HbWidget">
-      <layout orientation="Vertical" type="linear">
-        <linearitem itemname="list_search"/>
-      </layout>
-    </widget>
-    <widget name="search_panel" type="HbSearchPanel">
-      <bool name="visible" value="FALSE"/>
-    </widget>
-    <widget name="no_match_label" type="HbLabel">
-      <bool name="visible" value="FALSE"/>
-    </widget>
-  </section>
-  <section name="layout_find_no_match">
-    <widget name="list_search" type="HbListView">
-      <bool name="visible" value="FALSE"/>
-    </widget>
-    <widget name="content" role="HbView:widget" type="HbWidget">
-      <layout orientation="Vertical" type="linear">
-        <linearitem itemname="no_match_label"/>
-        <linearitem itemname="search_panel"/>
-      </layout>
-    </widget>
-    <widget name="search_panel" type="HbSearchPanel">
-      <bool name="visible" value="TRUE"/>
-    </widget>
-    <widget name="no_match_label" type="HbLabel">
-      <bool name="visible" value="TRUE"/>
-    </widget>
-  </section>
-  <section name="layout_find_no_searchpanel_no_match">
-    <widget name="list_search" type="HbListView">
-      <bool name="visible" value="FALSE"/>
-    </widget>
-    <widget name="content" role="HbView:widget" type="HbWidget">
-      <layout orientation="Vertical" type="linear">
-        <linearitem itemname="no_match_label"/>
-      </layout>
-    </widget>
-    <widget name="search_panel" type="HbSearchPanel">
-      <bool name="visible" value="FALSE"/>
-    </widget>
-    <widget name="no_match_label" type="HbLabel">
-      <bool name="visible" value="TRUE"/>
-    </widget>
-  </section>
-  <metadata activeUIState="search_no_match_no_panel" display="NHD-3.2-inch_portrait" unit="un">
-    <uistate name="Common ui state" sections="#common"/>
-    <uistate name="search" sections="#common layout_find"/>
-    <uistate name="search_no_panel" sections="#common layout_find_no_searchpanel"/>
-    <uistate name="search_no_match" sections="#common layout_find_no_match"/>
-    <uistate name="search_no_match_no_panel" sections="#common layout_find_no_searchpanel_no_match"/>
-    <dummydata objectName="list_search" section="#common" value="app_list_template5"/>
-  </metadata>
-</hbdocument>
--- a/userguide/rom/userguide.iby	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __HELP_IBY__
-#define __HELP_IBY__
-
-#include <bldprivate.hrh>
-
-#define HB_UPGRADABLE_APP_REG_RSC(NAME) data=DATAZ_\PRIVATE\10003A3F\IMPORT\APPS\ ## NAME ## _reg.rsc        Private\10003a3f\import\apps\ ## NAME ## _reg.rsc
-
-file=ABI_DIR\BUILD_DIR\Userguide.exe             SHARED_LIB_DIR\Userguide.exe
-
-
-HB_UPGRADABLE_APP_REG_RSC(Userguide)
-
-#endif
-
--- a/userguide/rom/userguide.pri	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-# 
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-# 
-# Contributors:
-# 
-# 
-# Description:
-# Rom exports for Help
-# 
-
-symbian {
-    HELP_IBY_DIR = $$section(PWD, ":", 1)
-    BLD_INF_RULES.prj_exports += "$${LITERAL_HASH}include <platform_paths.hrh>"
-    BLD_INF_RULES.prj_exports += "$$HELP_IBY_DIR/userguide.iby CORE_APP_LAYER_IBY_EXPORT_PATH(userguide.iby)"
-    BLD_INF_RULES.prj_exports += "$$HELP_IBY_DIR/userguide_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(userguide_resources.iby)"
-}
--- a/userguide/rom/userguide_resources.iby	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef USERGUIDE_RESOURCES
-#define USERGUIDE_RESOURCES
-
-
-#include <data_caging_paths_for_iby.hrh>
-
-data=DATAZ_\QT_TRANSLATIONS_DIR\userguide.qm QT_TRANSLATIONS_DIR\userguide.qm
-data=DATAZ_\APP_RESOURCE_DIR\Userguide.RSC APP_RESOURCE_DIR\Userguide.rsc
-
-
-#endif // USERGUIDE_RESOURCES
\ No newline at end of file
--- a/userguide/src/BrowserWrapper.cpp	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <QGraphicsScene>
-#include <QGraphicsProxyWidget>
-#include <QGraphicsLinearLayout>
-#include <QWebFrame>
-
-#include "HelpDocumentLoader.h"
-#include "HelpCommon.h"
-#include "BrowserWrapper.h"
-
-#ifdef Q_OS_SYMBIAN
-#include <wrtcontroller.h>
-#endif
-
-BrowserWrapper::BrowserWrapper()
-{
-}
-
-BrowserWrapper::~BrowserWrapper()
-{
-}
-
-void BrowserWrapper::init()
-{
-#ifdef Q_OS_SYMBIAN
-    WRT::WrtController* wrtController = new WRT::WrtController(this, WRT::GraphicsWebView);
-    mWebView = wrtController->graphicsWebView();
-#else
-	mWebView = new QGraphicsWebView();
-#endif
-    mWebView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
-    mWebView->page()->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
-    mWebView->page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
-	mWebView->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
-	mWebView->settings()->setAttribute(QWebSettings::JavascriptEnabled, true);
-    mWebView->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
-    mWebView->settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true);
-    connect(mWebView, SIGNAL(linkClicked(const QUrl&)), this, SIGNAL(linkClicked(const QUrl&)));
-    
-    QGraphicsLinearLayout* vLayout = new QGraphicsLinearLayout(this);
-    vLayout->setOrientation(Qt::Vertical);
-    vLayout->addItem(mWebView);
-    vLayout->setContentsMargins(0,0,0,0);
-    setLayout(vLayout);
-}
-
-void BrowserWrapper::setHtml(const QString& html, const QUrl& url)
-{
-    mWebView->setHtml(html, url);
-
-    if(!mHistory.count() || mHistory.top()!=url)
-    {
-        mHistory.append(url);
-    }
-}
-
-void BrowserWrapper::clearHistory()
-{
-    mHistory.clear();
-}
-
-bool BrowserWrapper::canGoBack()
-{
-    return (mHistory.count() > 1);
-}
-
-void BrowserWrapper::back()
-{
-    if(canGoBack())
-    {
-        mHistory.pop();
-        QUrl url = mHistory.top();
-        emit urlChanged(url);
-    }
-}
-
-
-// end of file
-
--- a/userguide/src/HelpBaseView.cpp	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <hbtoolbar.h>
-#include <hbnotificationdialog.h>
-#include <hbaction.h>
-
-#include "HelpBaseView.h"
-
-//////////////////////////////////////////////////////////////////////////////////////////////
-
-HelpBaseView::HelpBaseView()
-{
-}
-
-HelpBaseView::~HelpBaseView()
-{
-}
-
-
-////////////////////////////////////////////////////////////////////////////////////////////
-
-void HelpBaseView::initBaseDocMl()
-{
- // Create widget hierarchy
-    setObjectName( DOCML_VIEW_NAME );
-
-    // List existing root elements - this allows us to refer to objects in the XML 
-    // which are created outside the document.
-    QObjectList roots;
-    roots.append( this );
-
-	mBuilder.setObjectTree(roots);
-
-	mBuilder.load(QRC_DOCML_BASE);
-}
-
-void HelpBaseView::onToolbarOnlineSupport()
-{
-    HbNotificationDialog *notificationDialog = new HbNotificationDialog();
-    notificationDialog->setParent(this);
-    notificationDialog->setTitle(URL_LINK_SUPPORT);
-    notificationDialog->show();
-}
-
-
-// end of file
--- a/userguide/src/HelpCategoryView.cpp	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <QStandardItemModel>
-#include <QDebug>
-
-#include <hbmainwindow.h>
-#include <hbapplication.h>
-#include <hbaction.h>
-
-#include <hbtreeview.h>
-#include <hbscrollbar.h>
-#include <hbmenu.h>
-#include <hbtoolbar.h>
-
-#include "HelpDataProvider.h"
-
-#include "HelpCategoryView.h"
-
-
-//////////////////////////////////////////////////////////////////////////////////////////////
-
-HelpCategoryView::HelpCategoryView() : 
-mListAll(NULL),
-mExpandCount(0)
-{
-}
-
-HelpCategoryView::~HelpCategoryView()
-{
-}
-
-
-////////////////////////////////////////////////////////////////////////////////////////////
-
-void HelpCategoryView::init()
-{
-	initDocMl();
-    initAllList();
-}
-
-void HelpCategoryView::initDocMl()
-{
-	initBaseDocMl();
-    mBuilder.load(QRC_DOCML_CATEGORY);
-}
-
-void HelpCategoryView::initAllList()
-{
-    mListAll = mBuilder.findWidget<HbTreeView*>(DOCML_LIST_CATEGORY_ALL);
-    mListAll->setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff);
-    mListAll->setModel(HelpDataProvider::instance()->getCategoryData());
-    connect(mListAll, SIGNAL(activated(const QModelIndex&)), this, SLOT(onAllListActivated(const QModelIndex&)));
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////
-
-void HelpCategoryView::expandCollapseAllList(QStandardItem* item, bool expand)
-{
-	if(item->rowCount() <= 0)
-	{
-		return;
-	}
-	mListAll->setExpanded(item->index(),expand);
-	for(int i = 0; i < item->rowCount(); i++)
-	{		
-		expandCollapseAllList(item->child(i),expand);
-	}
-}
-
-void HelpCategoryView::updateExpandCollapseAction(bool expand)
-{
-	HbAction* allAction = mBuilder.findObject<HbAction*>(DOCML_ACTION_EXPAND_COLLAPSE_ALL);
-	allAction->setText(expand ? hbTrId(TXT_EXPAND_ALL) : hbTrId(TXT_COLLAPSE_ALL));
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////
-// handle list event
-
-void HelpCategoryView::onAllListActivated(const QModelIndex& index)
-{
-    if(!index.isValid() ||          // invalid
-       index.child(0,0).isValid())  // this is a node
-    {
-		if(index.parent().isValid())
-		{
-			return;
-		}
-		
-		if(mListAll->isExpanded(index))
-		{
-			mExpandCount++;
-		}
-		else
-		{
-			mExpandCount--;
-		}
-		updateExpandCollapseAction(mExpandCount == 0);
-        return;
-    }
-
-	QString uid = mListAll->model()->data(index, UidRole).toString();
-    QString href = mListAll->model()->data(index, HrefRole).toString();
-    HelpDataProvider::instance()->setHelpContentUrl(uid, href);
-    emit activateView(HelpViewContents);
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////
-// handle menu event
-void HelpCategoryView::onExpandOrCollapseAll()
-{
-	bool needExpand = (mExpandCount == 0);
-	QStandardItemModel* model = (QStandardItemModel*)(mListAll->model());
-	expandCollapseAllList(model->invisibleRootItem(),needExpand);
-	mExpandCount = needExpand ?  model->invisibleRootItem()->rowCount() : 0;
-	updateExpandCollapseAction(mExpandCount == 0);
-}
-
-// end of file
--- a/userguide/src/HelpContentsView.cpp	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <QUrl>
-#include <QProcess>
-#include <QLatin1String>
-#include <QDebug>
-
-#include <hbaction.h>
-#include <hbmainwindow.h>
-#include <hbmenu.h>
-
-#include "BrowserWrapper.h"
-#include "HelpDataProvider.h"
-#include "HelpUtils.h"
-#include "HelpContentsView.h"
-
-HelpContentsView::HelpContentsView() : mBrowser(NULL)
-{
-}
-
-HelpContentsView::~HelpContentsView()
-{
-}
-
-void HelpContentsView::init()
-{
-	initDocMl();
-    initBackAction();
-    mBrowser = mBuilder.findWidget<BrowserWrapper*>(DOCML_BROWSER_CONTENTS);
-    mBrowser->init();
-
-    connect(mBrowser, SIGNAL(linkClicked(const QUrl&)), this, SLOT(onLinkClicked(const QUrl&)));
-    connect(mBrowser, SIGNAL(urlChanged(const QUrl&)), this, SLOT(onUrlChanged(const QUrl&)));
-    connect(mainWindow(), SIGNAL(viewReady()), this, SLOT(onViewReady()));
-}
-
-void HelpContentsView::initDocMl()
-{
-	initBaseDocMl();
-    mBuilder.load(QRC_DOCML_CONTENTS);
-}
-
-void HelpContentsView::initBackAction()
-{
-    mSoftKeyAction = new HbAction(Hb::BackNaviAction  );
-    connect(mSoftKeyAction, SIGNAL(triggered()), this, SLOT(onBackAction()));
-}
-
-///////////////////////////////////////////////////////////////////////////////////////
-
-bool HelpContentsView::openApplication(const QUrl& url)
-{
-	QString str = url.toString();
-	if(str.startsWith(URL_HEADER_APP))
-	{
-        //app://cmd@localhost/APP_NAME/APP_UID
-        QString appUid = str.section(BACKSLASH, -1,-1);
-        if(appUid.contains("0x", Qt::CaseInsensitive))
-        {
-            appUid.remove(0,2);
-        }
-        int error = HelpUtils::launchApplication(appUid);
-        if(error != 0)
-        {
-            qDebug() << "AIW-ERROR: AppMgrClient:test: Send failed" << error;
-        }
-        return true;
-	}
-	
-	return false;
-}
-
-bool HelpContentsView::openExternalLink(const QUrl& url)
-{
-	QString str = url.toString();
-	if(str.startsWith(URL_HEADER_HTTP) || 
-	   str.startsWith(URL_HEADER_HTTPS) || 
-	   str.startsWith(URL_HEADER_FTP))
-	{
-		return true;
-	}
-	
-    return false;
-}
-
-void HelpContentsView::openHelpContent(const QUrl& url)
-{
-    QString html;
-    QString urlStr = url.toString();
-    HelpDataProvider::instance()->getHelpContentData(html, urlStr);
-	mBrowser->setHtml(html, urlStr);
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////
-
-void HelpContentsView::onViewReady()
-{
-    if(isVisible())
-    {
-        setNavigationAction(mSoftKeyAction);
-        openHelpContent();
-    }
-    else
-    {
-        mBrowser->clearHistory();
-    }    
-}
-
-///////////////////////////////////////////////////////////////////////////////////////
-
-void HelpContentsView::onBackAction()
-{
-	if(mBrowser->canGoBack())
-	{
-		mBrowser->back();
-	}
-	else
-	{
-		emit activateView(PreviousView);
-	}
-}
-
-///////////////////////////////////////////////////////////////////////////////////////
-
-void HelpContentsView::onLinkClicked(const QUrl& url)
-{
-    // try to open as application
-    if(openApplication(url))
-    {
-        return;
-    }
-
-    // try to open as remote link
-    if(openExternalLink(url))
-    {
-        return;
-    }
-
-    // try to open as local link
-    {
-        openHelpContent(url);
-        return;
-    }
-}
-
-void HelpContentsView::onUrlChanged(const QUrl& url)
-{
-    openHelpContent(url);
-}
-
-
-// end of file
--- a/userguide/src/HelpDataProvider.cpp	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,510 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <QStandardItemModel>
-#include <QXmlQuery>
-#include <QFile>
-#include <QXmlStreamReader>
-#include <QDebug>
-#include <QDir>
-
-#include "HelpUtils.h"
-#include "HelpCommon.h"
-#include "HelpProxyModel.h"
-#include "HelpStandardItem.h"
-
-#include "HelpDataProvider.h"
-
-
-HelpDataProvider::HelpDataProvider()
-{
-	mHelpModel = new QStandardItemModel();
-	mKeywordModel = new QStandardItemModel();
-	mSearhResultModel = new HelpProxyModel();
-	mSearhResultModel->setSourceModel(mKeywordModel);
-	mAppItem = NULL;
-}
-
-HelpDataProvider::~HelpDataProvider()
-{
-	delete mHelpModel;
-	delete mSearhResultModel;
-	delete mKeywordModel;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////////////
-
-HelpDataProvider* gHelpDataProviderInstance = NULL;
-
-HelpDataProvider* HelpDataProvider::instance()
-{
-    if(!gHelpDataProviderInstance)
-    {
-        gHelpDataProviderInstance = new HelpDataProvider();
-    }
-
-    return gHelpDataProviderInstance;
-}
-
-void HelpDataProvider::destroyInstance()
-{
-    delete gHelpDataProviderInstance;
-    gHelpDataProviderInstance = NULL;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////////////
-
-QAbstractItemModel* HelpDataProvider::getCategoryData()
-{
-    return mHelpModel;
-}
-
-QAbstractItemModel* HelpDataProvider::getSearchData(const QString& key)
-{
-	if(key == mLastSrhKey)
-	{
-		return mSearhResultModel;
-	}
-
-	mLastSrhKey = key;
-    mSearhResultModel->setFilterRegExp(key);
-
-	
-    return mSearhResultModel;
-}
-
-void HelpDataProvider::setHelpContentUrl(const QString& uid, const QString& href)
-{
-    QUrl url = QUrl::fromLocalFile(uid+BACKSLASH+href);
-    mHelpContentRoot = url.toString();
-}
-
-void HelpDataProvider::getHelpContentData(QString& content, QString& url)
-{
-    // url
-    if(url.isEmpty())
-    {
-        url = mHelpContentRoot;
-    }
-    url.remove(URL_HEADER_LOCAL);
-
-    // uid
-    QString uid = url.section(BACKSLASH, 0, -3);
-    uid.append(BACKSLASH + url.section(BACKSLASH, -2,-2));
-
-    // href
-    QString href = url.section(BACKSLASH, -1,-1);
-    int anchorPos = href.indexOf(HASHMARK);
-    if(anchorPos != -1)
-    {
-        href = href.section(HASHMARK, 0, 0);
-    }
-
-    QString path(uid);
-    path.append(BACKSLASH);
-    path.append(CONTENTSZIP);
-    HelpUtils::loadHtmlFromZipFile(path , href, content);
-}
-
-
-///////////////////////////////////////////////////////////////////////////////////////
-
-void HelpDataProvider::createHelpCategory()
-{
-	constructCategory();
-
-	mHelpModel->setSortRole(Qt::DisplayRole);
-
-	constructCategory2((HelpStandardItem*)mHelpModel->invisibleRootItem());
-
-	if(mAppItem)
-	{
-		mHelpModel->appendRow(mAppItem);
-		mAppItem->sortChildren(0, HelpUtils::sortOrder());
-		constructCategory2(mAppItem);
-	}	
-
-	mKeywordModel->sort(0, HelpUtils::sortOrder());
-}
-
-void HelpDataProvider::constructCategory()
-{
-	QFileInfoList driveList = QDir::drives();
-	QDir dir;
-	QString lang = HelpUtils::UILocaleFromQtToSymbian();
-
-	QString path(HelpUtils::rootPath());
-	path.append(XHTMLPATH);
-	path.append(lang);
-
-	QStringList uidList;
-	QStringList titleList;
-	parseCategoryIndexXml(path, uidList, titleList);
-
-	//scan other root path and construct 3rd party help
-	foreach(QFileInfo fi, driveList)
-	{
-		path.clear();
-		path.append(fi.absolutePath());
-		path.append(XHTMLPATH);
-		path.append(lang);
-		dir.setPath(path);
-		if(dir.exists())
-		{
-			if(QString::compare(fi.absolutePath(), HelpUtils::rootPath(), Qt::CaseInsensitive) == 0)
-			{
-				continue;
-			}
-			constructAppCategory(path, uidList);
-		}
-	}
-
-	constructBuiltInCategory(path, uidList, titleList);
-
-	mHelpModel->setSortRole(PriorityRole);
-	mHelpModel->sort(0, HelpUtils::sortOrder());
-}
-
-void HelpDataProvider::constructBuiltInCategory(const QString& path, const QStringList& uidList, const QStringList& titleList)
-{
-	if(uidList.count() != titleList.count())
-	{
-		//ToDo
-		return;
-	}
-
-	for(int i = 0; i < uidList.count(); i++)
-	{
-		if(mUpdateUidList.contains(uidList[i]))
-		{
-			continue;
-		}
-
-		QString uid(path);
-		uid.append(BACKSLASH);
-		uid.append(uidList[i]);
-
-		constructBuiltInCategoryItem(uid, titleList[i]);
-	}
-}
-
-void HelpDataProvider::constructAppCategory(const QString& path, QStringList& uidList)
-{
-	QDir dir(path);	
-	if(!dir.exists())
-	{
-		return;
-	}
-
-	QStringList uidDirList = dir.entryList();
-	QString pathUid;
-	foreach(QString uid, uidDirList)
-	{
-		pathUid.clear();
-		pathUid.append(path);
-		pathUid.append(BACKSLASH);
-		pathUid.append(uid);
-
-		QString titleStr;
-		parseAppMetaxml(pathUid, titleStr);
-		if(titleStr.isEmpty())
-		{
-			continue;
-		}
-
-		if(uidList.contains(uid) || mUpdateUidList.contains(uid))
-		{
-			mUpdateUidList.append(uid);
-			constructBuiltInCategoryItem(pathUid, titleStr);
-			continue;
-		}
-
-		HelpStandardItem* item = NULL;
-		item = new HelpStandardItem(titleStr);
-
-		if(!item)
-		{
-			//no memory
-			return;
-		}
-
-		item->setData(pathUid, UidRole);
-
-		if(!mAppItem)
-		{
-			mAppItem = new HelpStandardItem(qtTrId(TXT_APPLICATIONS));
-			if(!mAppItem)
-			{
-				//no memory
-				return;
-			}
-			mAppItem->setData(APPPRIORITY, PriorityRole);
-		}
-		mAppItem->appendRow(item);
-	}
-}
-
-void HelpDataProvider::constructBuiltInCategoryItem(const QString& uid, const QString& title)
-{
-	int priority;
-	parseBuiltInMetaxml(uid, priority);
-	
-	HelpStandardItem* item = NULL;
-	item = new HelpStandardItem(title);
-
-	if(!item)
-	{
-		//no memory
-		return;
-	}
-	item->setData(uid, UidRole);
-	item->setData(priority, PriorityRole);
-	mHelpModel->appendRow(item);
-}
-
-void HelpDataProvider::constructCategory2(HelpStandardItem* itemParent)
-{
-	int count = itemParent->rowCount();
-	for(int i =0; i < count; i++)
-	{
-		HelpStandardItem* item = (HelpStandardItem*)itemParent->child(i);
-		constructCategory2Item(item);
-	}
-}
-
-void HelpDataProvider::constructCategory2Item(HelpStandardItem* itemParent)
-{
-	QStringList hrefList;
-	QStringList titleList;
-
-	QString uid = itemParent->data(UidRole).toString();
-	parseCategory2IndexXml(uid, hrefList, titleList);
-
-	if(hrefList.count() == 0 || hrefList.count() != titleList.count())
-	{
-		return;
-	}
-
-	for(int i = 0; i < hrefList.count(); i++)
-	{
-		HelpStandardItem* item = NULL;
-		item = new HelpStandardItem(titleList[i]);
-		if(!item)
-		{
-			//no memory
-			return;
-		}
-		item->setData(hrefList[i], HrefRole);
-		item->setData(uid, UidRole);
-		itemParent->appendRow(item);
-		constructKeywordModel(titleList[i], uid, hrefList[i]);
-	}
-
-	itemParent->sortChildren(0, HelpUtils::sortOrder());
-}
-
-void HelpDataProvider::constructKeywordModel(const QString& title, const QString& uid, const QString& href)
-{
-	HelpStandardItem* item = NULL;
-	item = new HelpStandardItem(title);
-	if(!item)
-	{
-		//no memory
-		return;
-	}
-	item->setData(uid, UidRole);
-	item->setData(href, HrefRole);
-	mKeywordModel->appendRow(item);
-}
-
-void HelpDataProvider::parseCategoryIndexXml(const QString& path, QStringList& uidList, QStringList& titleList)
-{
-	QString pathIndex(path);
-	pathIndex.append(BACKSLASH);
-	pathIndex.append(INDEXXML);
-
-	QFile file(pathIndex);
-	if (!file.open(QIODevice::ReadOnly)) {
-		return;
-	}
-
-	//parse index xml to a stringlist, each string include id and navtitle and seperate by "specilchar"
-	QXmlQuery query;
-	query.bindVariable("inputdoc", &file);
-
-	query.setQuery("doc($inputdoc)/collections/collection/xs:string(@id)");
-	if(!query.isValid())
-	{
-		return;
-	}
-	if(!query.evaluateTo(&uidList))
-	{
-		return;
-	}
-
-	query.setQuery("doc($inputdoc)/collections/collection/xs:string(@navtitle)");
-	if(!query.isValid())
-	{
-		return;
-	}
-	if(!query.evaluateTo(&titleList))
-	{
-		return;
-	}
-
-	QStringList featureIdLst;
-
-	query.setQuery("doc($inputdoc)/collections/collection/number(@FeatureId)");
-	if(!query.isValid())
-	{
-		return;
-	}
-	if(!query.evaluateTo(&featureIdLst))
-	{
-		return;
-	}
-
-	if(featureIdLst.count() != uidList.count())
-	{
-		return;
-	}
-
-	for(int i = featureIdLst.count()  - 1; i >= 0; i--)
-	{
-		int featureID = featureIdLst.at(i).toInt();
-		if(!HelpUtils::suppportFeatureID(featureID))
-		{
-			uidList.removeAt(i);
-			titleList.removeAt(i);
-		}
-	}
-}
-
-void HelpDataProvider::parseCategory2IndexXml(const QString& path, QStringList& hrefList, QStringList& titleList)
-{
-	QString pathIndex(path);
-	pathIndex.append(BACKSLASH);
-	pathIndex.append(INDEXXML);
-
-	QFile file(pathIndex);
-	if (!file.open(QIODevice::ReadOnly)) {
-		return;
-	}
-
-	//parse index xml to a stringlist, each string include href and navtitle and seperate by "specilchar"
-	QXmlQuery query;
-	query.bindVariable("inputdoc", &file);
-
-	query.setQuery("doc($inputdoc)/topics/topicref/xs:string(@href)");	
-	if(!query.isValid())
-	{
-		return;
-	}
-	if(!query.evaluateTo(&hrefList))
-	{
-		return;
-	}	
-
-	query.setQuery("doc($inputdoc)/topics/topicref/xs:string(@navtitle)");
-	if(!query.isValid())
-	{
-		return;
-	}
-	if(!query.evaluateTo(&titleList))
-	{
-		return;
-	}
-
-	QStringList featureIdLst;
-
-	query.setQuery("doc($inputdoc)/topics/topicref/number(@FeatureId)");
-	if(!query.isValid())
-	{
-		return;
-	}
-	if(!query.evaluateTo(&featureIdLst))
-	{
-		return;
-	}
-
-	if(featureIdLst.count() != hrefList.count())
-	{
-		return;
-	}
-
-	for(int i = featureIdLst.count()  - 1; i >= 0; i--)
-	{
-		int featureID = featureIdLst.at(i).toInt();
-		if(!HelpUtils::suppportFeatureID(featureID))
-		{
-			hrefList.removeAt(i);
-			titleList.removeAt(i);
-		}
-	}
-}
-
-void HelpDataProvider::parseBuiltInMetaxml(const QString& path, int& priority)
-{
-	QString pathMetaxml(path);
-	pathMetaxml.append(BACKSLASH);
-	pathMetaxml.append(METAXML);
-
-	priority = -1;
-
-	QFile file(pathMetaxml);
-	if (!file.open(QIODevice::ReadOnly))
-	{
-		return;
-	}
-
-	QXmlQuery query;
-	QString str;
-	query.bindVariable("inputdoc", &file);
-
-	query.setQuery("doc($inputdoc)/meta/number(priority)");	
-	if(query.isValid() && query.evaluateTo(&str))
-	{
-		priority = str.toInt();
-	}
-}
-
-void HelpDataProvider::parseAppMetaxml(const QString& path, QString& title)
-{
-	QString pathMetaxml(path);
-	pathMetaxml.append(BACKSLASH);
-	pathMetaxml.append(METAXML);
-	QFile file(pathMetaxml);
-	if (!file.open(QIODevice::ReadOnly)) {
-		return;
-	}
-
-	//parse meta xml, get the title string
-	QXmlQuery query;
-	query.bindVariable("inputdoc", &file);
-	query.setQuery("doc($inputdoc)/meta/string(title)");
-	if(!query.isValid())
-	{
-		return;
-	}
-
-	if(!query.evaluateTo(&title))
-	{
-		return;
-	}
-}
--- a/userguide/src/HelpDocumentLoader.cpp	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "HelpCategoryView.h"
-#include "HelpContentsView.h"
-#include "BrowserWrapper.h"
-
-#include "HelpDocumentLoader.h"
-
-
-////////////////////////////////////////////////////////////////////////////////////////////
-
-QObject* HelpDocumentLoader::createObject(const QString& type, const QString& name)
-{
-    if(type == BrowserWrapper::staticMetaObject.className())    
-    {
-        QObject* object = new BrowserWrapper;
-        object->setObjectName(name);
-        return object;
-    }
- 
-    return HbDocumentLoader::createObject(type, name);
-}
-
-
-////////////////////////////////////////////////////////////////////////////////////////////
-void HelpUIBuilder::setObjectTree(QObjectList roots)
-{
-	mDocLoader.setObjectTree(roots);
-}
-
-QObjectList HelpUIBuilder::load(const QString& fileName)
-{ 
-    bool ok = false;
-    QObjectList list = mDocLoader.load(fileName, &ok);
-    Q_ASSERT_X(ok, "Help", "HelpUIBuilder load file");
-    return list;
-}
-
-QObjectList HelpUIBuilder::load(const QString& fileName, const QString& section)
-{
-    bool ok = false;
-    QObjectList list = mDocLoader.load(fileName, section, &ok);
-    Q_ASSERT_X(ok, "Help", "HelpUIBuilder load section");
-    return list;
-}
-
-QGraphicsWidget* HelpUIBuilder::findWidget(const QString& name)
-{
-    return mDocLoader.findWidget(name);
-}
-
-QObject* HelpUIBuilder::findObject(const QString& name)
-{
-    return mDocLoader.findObject(name);
-}
-
-// end of file
-
--- a/userguide/src/HelpKeywordView.cpp	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,283 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <QStandardItemModel>
-#include <QDebug>
-
-#include <hbmainwindow.h>
-#include <hbapplication.h>
-#include <hbaction.h>
-#include <hbtoolbar.h>
-#include <hblabel.h>
-
-#include <hbtreeview.h>
-#include <hblistview.h>
-#include <hbsearchpanel.h>
-#include <hbscrollbar.h>
-#include <hblineedit.h>
-#include <hbmenu.h>
-#include <hbstaticvkbhost.h>
-
-#include "HelpDataProvider.h"
-#include "HelpProxyModel.h"
-
-#include "HelpKeywordView.h"
-
-
-//////////////////////////////////////////////////////////////////////////////////////////////
-
-HelpKeywordView::HelpKeywordView() : 
-mListSearch(NULL), 
-mSearchPanel(NULL)
-{
-}
-
-HelpKeywordView::~HelpKeywordView()
-{
-}
-
-
-////////////////////////////////////////////////////////////////////////////////////////////
-
-void HelpKeywordView::init()
-{
-	initDocMl();
-    initBackAction();
-    initSearchList();
-    initSearchPanel();
-	initVirtualKeyboard();
-    
-    connect(mainWindow(), SIGNAL(viewReady()), this, SLOT(onViewReady()));
-}
-
-void HelpKeywordView::initDocMl()
-{
-	initBaseDocMl(); 
-	mBuilder.load(QRC_DOCML_KEYWORD);
-}
-
-void HelpKeywordView::initBackAction()
-{
-    mSoftKeyAction = new HbAction(Hb::BackNaviAction);
-    connect(mSoftKeyAction, SIGNAL(triggered()), this, SLOT(onBackAction()));
-}
-
-void HelpKeywordView::initSearchList()
-{
-    mListSearch = mBuilder.findWidget<HbListView*>(DOCML_LIST_SEARCH);
-    mListSearch->setHorizontalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff);
-    mListSearch->setModel(HelpDataProvider::instance()->getSearchData());
-    connect(mListSearch, SIGNAL(activated(const QModelIndex&)), this, SLOT(onSearchListActivated(const QModelIndex&)));
-}
-void HelpKeywordView::initSearchPanel()
-{
-    mSearchPanel = mBuilder.findWidget<HbSearchPanel*>(DOCML_SEARCH_PANEL);
-    connect(mSearchPanel, SIGNAL(exitClicked()), this, SLOT(onSearchPanelExitClicked()));
-    connect(mSearchPanel, SIGNAL(criteriaChanged(const QString&)), this, SLOT(onSearchPanelCriteriaChanged(const QString&)));
-}
-
-void HelpKeywordView::initVirtualKeyboard()
-{
-	mVirtualKeyboard = new HbStaticVkbHost(this);
-    connect(mVirtualKeyboard, SIGNAL(keypadOpened()), this, SLOT(onHandleKeypadOpen()));
-    connect(mVirtualKeyboard, SIGNAL(keypadClosed()), this, SLOT(onHandleKeypadClose()));
-}
-
-HbLabel* HelpKeywordView::label()
-{
-	return mBuilder.findWidget<HbLabel*>(DOCML_NO_MATCH_LABEL);
-}
-
-void HelpKeywordView::loadAllContent()
-{
-	showToolBar(false);
-	mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH);
-	ResetSearchPanel();
-	
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////
-
-void HelpKeywordView::updateVisibleItems(bool visible)
-{
-	static Hb::SceneItems items = Hb::TitleBarItem | Hb::StatusBarItem;
-	if(visible)
-	{
-		showItems(items);
-	}
-	else
-	{
-		hideItems(items);
-	}
-}
-
-void HelpKeywordView::ResetSearchPanel()
-{
-    foreach(QGraphicsItem *obj, mSearchPanel->childItems())
-    {
-        QGraphicsWidget *const widget = static_cast<QGraphicsWidget*>(obj);
-        if(widget != NULL)
-        {
-            HbLineEdit *const lineEdit = qobject_cast<HbLineEdit*>(widget);
-            if(lineEdit != NULL)
-            {
-                lineEdit->setText("");
-				lineEdit->setFocus();
-                break;
-            }
-        }
-    }
-}
-
-void HelpKeywordView::updateLabelPos()
-{
-	HbDeviceProfile profile = HbDeviceProfile::profile(mainWindow());
-	qreal unValue = profile.unitValue();
-	if(mainWindow()->orientation() == Qt::Vertical)
-	{
-		if(mVirtualKeyboard->keypadStatus() == HbVkbHost::HbVkbStatusClosed)
-		{
-			label()->setContentsMargins(0,30 * unValue,0,0);
-		}
-		else
-		{
-			label()->setContentsMargins(0,10 * unValue,0,0);
-		}
-	}
-	else
-	{
-		if(mVirtualKeyboard->keypadStatus() == HbVkbHost::HbVkbStatusClosed)
-		{
-			label()->setContentsMargins(0,10 * unValue,0,0);
-		}
-		else
-		{
-            label()->setContentsMargins(0,0,0,0);
-			label()->setAlignment(label()->alignment() | Qt::AlignVCenter);
-		}
-	}
-}
-
-void HelpKeywordView::showToolBar(bool visible)
-{
-	Hb::SceneItems items = Hb::ToolBarItem;
-	if(visible)
-	{
-		showItems(items);
-	}
-	else
-	{
-		hideItems(items);
-	}
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////
-// handle system event
-
-void HelpKeywordView::onViewReady()
-{
-	if(isVisible())
-	{
-		setNavigationAction(mSoftKeyAction);  
-	}
-}
-
-///////////////////////////////////////////////////////////////////////////////////////
-// handle button back action
-
-void HelpKeywordView::onBackAction()
-{
-	emit activateView(HelpViewCategory);
-}
-
-
-////////////////////////////////////////////////////////////////////////////////////////////
-// handle list event
-
-void HelpKeywordView::onSearchListActivated(const QModelIndex& index)
-{
-    if(!index.isValid() ||          // invalid
-       index.child(0,0).isValid())  // this is a node
-    {
-        return;
-    }
-    
-    QString uid = mListSearch->model()->data(index, UidRole).toString();
-    QString href = mListSearch->model()->data(index, HrefRole).toString();
-    HelpDataProvider::instance()->setHelpContentUrl(uid, href);
-    emit activateView(HelpViewContents);
-}
-
-
-////////////////////////////////////////////////////////////////////////////////////////////
-// handle search panel event
-
-void HelpKeywordView::onSearchPanelExitClicked()
-{
-	if(mListSearch->model()->rowCount() == 0)
-	{
-		mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH_NO_SRHPAL_NO_MATCH);
-	}
-	else
-	{
-		mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH_NO_SRHPAL);
-	}	
-	showToolBar(true);
-}
-
-void HelpKeywordView::onSearchPanelCriteriaChanged(const QString &criteria)
-{
-    HelpDataProvider::instance()->getSearchData(criteria);
-	if(mListSearch->model()->rowCount() == 0)
-	{
-		mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH_NO_MATCH);
-	}
-	else
-	{
-		mBuilder.load(QRC_DOCML_KEYWORD, DOCML_LAYOUT_SEARCH);
-	}
-	showToolBar(false);
-}
-
-////////////////////////////////////////////////////////////////////////////////////////////
-// handle virtual keyboard event
-
-void HelpKeywordView::onHandleKeypadOpen()
-{
-	updateVisibleItems(false);
-    qreal heightToSet = mainWindow()->layoutRect().height() - mVirtualKeyboard->keyboardArea().height();
-    this->setMaximumHeight(heightToSet);
-	updateLabelPos();
-}
-
-void HelpKeywordView::onHandleKeypadClose()
-{	
-	updateVisibleItems(true);
-	qreal mainHeight  = mainWindow()->layoutRect().height();
-	qreal toolbarHeight = toolBar()->size().height();
-	qreal height = mainHeight - ( toolBar()->isVisible() ? toolbarHeight : 0);
-	this->setMaximumHeight(height);
-	updateLabelPos();
-}
-
-void HelpKeywordView::onOrientationChanged(Qt::Orientation orientation)
-{
-	Q_UNUSED(orientation);
-	updateLabelPos();
-}
-
-// end of file
--- a/userguide/src/HelpMainWindow.cpp	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <hbtoolbar.h>
-#include <hbnotificationdialog.h>
-#include <hbaction.h>
-#include <hbapplication.h>
-#include <hbactivitymanager.h>
-
-#include "HelpBaseView.h"
-#include "HelpCategoryView.h"
-#include "HelpKeywordView.h"
-#include "HelpContentsView.h"
-
-#include "HelpMainWindow.h"
-#include "HelpDataProvider.h"
-
-HelpMainWindow::HelpMainWindow() : 
-mCategoryView(NULL),
-mKeywordView(NULL),
-mContentsView(NULL)
-{
-    QObject::connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(saveActivity()));
-	HelpDataProvider::instance()->createHelpCategory();
-    activateCategoryView();
-}
-
-HelpMainWindow::~HelpMainWindow()
-{
-    HelpDataProvider::destroyInstance();
-}
-
-void HelpMainWindow::onActivateView(HelpViewName viewName)
-{
-	switch(viewName)
-	{
-	    case HelpViewCategory:
-            activateCategoryView();
-			break;
-	    case HelpViewKeyword:
-            activateKeywordView();
-			break;
-	    case HelpViewContents:
-            activateContentsView();
-			break;
-		case PreviousView:
-			{
-				onActivateView(mPreviousViewName);
-			}
-			break;
-	    default:
-			HbApplication::exit();
-	        break;
-	}
-}
-
-void HelpMainWindow::activateCategoryView()
-{
-    if(!mCategoryView)
-    {
-        mCategoryView = new HelpCategoryView();
-        addView(mCategoryView);
-        mCategoryView->init();
-        emit currentViewChanged(mCategoryView);
-		connectViewSignal(mCategoryView);
-    }
-
-	mPreviousViewName = HelpViewCategory;
-    setCurrentView(mCategoryView);
-}
-
-void HelpMainWindow::activateKeywordView()
-{
-    if(!mKeywordView)
-    {
-        mKeywordView = new HelpKeywordView();
-		addView(mKeywordView);
-        mKeywordView->init();
-		connectViewSignal(mKeywordView);
-    }
-
-	mPreviousViewName = HelpViewKeyword;	
-    setCurrentView(mKeywordView);	
-}
-
-void HelpMainWindow::activateContentsView()
-{
-    if(!mContentsView)
-    {
-		mContentsView = new HelpContentsView();
-		addView(mContentsView);
-        mContentsView->init();
-
-        connectViewSignal(mContentsView);
-    }
-    setCurrentView(mContentsView);
-}
-
-void HelpMainWindow::connectViewSignal(const HelpBaseView *view)
-{
-	connect(this, SIGNAL(orientationChanged(Qt::Orientation)), view, SLOT(onOrientationChanged(Qt::Orientation)));
-    connect(view, SIGNAL(activateView(HelpViewName)), this, SLOT(onActivateView(HelpViewName)));
-    
-    connect(view, SIGNAL(showAllList()), this, SLOT(onShowAllList()));
-    connect(view, SIGNAL(showFindList()), this, SLOT(onShowFindList()));
-}
-
-
-////////////////////////////////////////////////////////////////////////////////////
-// handle view event
-
-void HelpMainWindow::onShowAllList()
-{
-    activateCategoryView();
-}
-
-void HelpMainWindow::onShowFindList()
-{	
-    activateKeywordView();
-	mKeywordView->loadAllContent();
-}
-
-void HelpMainWindow::saveActivity()
-{
-	HbActivityManager* activityManager = qobject_cast<HbApplication*>(qApp)->activityManager();
-
-	// clean up any previous versions of this activity from the activity manager.
-	bool ok = activityManager->removeActivity("UserGuideMainView");
-	if ( !ok )
-	{
-		//qFatal("Remove failed" );
-	}
-
-	// get a screenshot for saving to the activity manager
-	QVariantHash metadata;
-	metadata.insert("screenshot", QPixmap::grabWidget(this, rect()));
-
-	// save any data necessary to save the state
-	QByteArray serializedActivity;
-	QDataStream stream(&serializedActivity, QIODevice::WriteOnly | QIODevice::Append);
-
-	// add the activity to the activity manager
-	ok = activityManager->addActivity("UserGuideMainView", serializedActivity, metadata);
-	if ( !ok )
-	{
-		qFatal("Add failed" );
-	}
-}
-
-// end of file
-
--- a/userguide/src/HelpProxyModel.cpp	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <QStringList>
-#include <QDebug>
-
-#include "HelpUtils.h"
-#include "HelpCommon.h"
-#include "HelpProxyModel.h"
-
-HelpProxyModel::HelpProxyModel(QObject * parent):QSortFilterProxyModel(parent)
-{
-}
-
-HelpProxyModel::~HelpProxyModel()
-{
-}
-
-bool HelpProxyModel::filterAcceptsRow(int sourceRow,
-        const QModelIndex &sourceParent) const
-{
-	QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent);
-
-	switch(filterRole())
-	{
-	case KeywordRole:
-		{			
-			QStringList keywordLst = sourceModel()->data(index, KeywordRole).toStringList();
-
-			foreach(QString str, keywordLst)
-			{
-				if(HelpUtils::findStr(str, filterRegExp().pattern()) != -1)
-				{
-					return true;
-				}
-			}
-			return false;
-		}
-	case Qt::DisplayRole:
-		{
-			QString title = sourceModel()->data(index, Qt::DisplayRole).toString();
-			if(HelpUtils::findStr(title, filterRegExp().pattern()) != -1)
-			{
-				return true;
-			}
-			return false;
-		}
-	default:
-		return QSortFilterProxyModel::filterAcceptsRow(sourceRow, sourceParent);
-	}
-}
--- a/userguide/src/HelpStandardItem.cpp	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "HelpUtils.h"
-#include "HelpCommon.h"
-#include "HelpStandardItem.h"
-
-HelpStandardItem::HelpStandardItem(const QString& text) : QStandardItem(text)
-{
-}
-
-HelpStandardItem::~HelpStandardItem()
-{
-}
-
-bool HelpStandardItem::operator<(const QStandardItem & other) const
-{
-	const int role = model() ? model()->sortRole() : Qt::DisplayRole;
-	switch(role)
-	{
-	case Qt::DisplayRole:
-		if(HelpUtils::compareStr(text(), other.text()) < 0)
-		{
-			return true;
-		}
-		break;
-	case UidRole:
-	case HrefRole:
-	case KeywordRole:
-	default:
-		return QStandardItem::operator<(other);
-	}
-	return false;
-}
--- a/userguide/src/HelpUtils.cpp	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,289 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <QFile>
-#include <QMap>
-#include <QLocale>
-
-#include <hbstringutil.h>
-
-#include "HelpUtils.h"
-
-
-/////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-#ifdef Q_OS_SYMBIAN
-
-#include <qsysteminfo.h>
-#include <xqappmgr.h>
-
-#include <e32const.h>
-#include <eikenv.h>
-#include <zipfile.h>
-
-void LoadFileFromZipL(const TDesC& aZipName, const TDesC& aFileName, QString& desBuffer)
-    {
-    
-    // open the zip file
-    RFs& fs = CEikonEnv::Static()->FsSession();
-    CZipFile* zipFile = CZipFile::NewL(fs, aZipName);
-    CleanupStack::PushL(zipFile);
-    TInt err = zipFile->OpenL();
-
-    if(err == KErrNone)
-        {
-        CZipFileMember* member = zipFile->MemberL(aFileName);
-        if(member) // member exist
-            {
-            CleanupStack::PushL(member);
-
-            RZipFileMemberReaderStream* stream; 
-            zipFile->GetInputStreamL(member, stream);
-            CleanupStack::PushL(stream);
-            
-            HBufC8* buffer = HBufC8::NewLC(member->UncompressedSize());
-            TPtr8 ptr(buffer->Des());
-            User::LeaveIfError(stream->Read(ptr, member->UncompressedSize()));
-
-            QByteArray byteArray((const char*)buffer->Ptr(), buffer->Length());
-            desBuffer.append(byteArray);
-
-            CleanupStack::PopAndDestroy(buffer);
-            CleanupStack::PopAndDestroy(stream);
-            CleanupStack::PopAndDestroy(member);
-            }
-        }
-    
-    zipFile->Close();
-    CleanupStack::PopAndDestroy(zipFile);
-
-    }
-
-void FixPathSlash(TDes& aPath)
-    {
-    for(TInt i=0; i<aPath.Length(); i++)
-        {
-        if(aPath[i] == '/') aPath[i] = '\\';
-        }
-    }
-
-void HelpUtils::loadHtmlFromZipFile(const QString& path, const QString& htmlFile, QString& htmlContent)
-    {
-    TFileName zipNameDes(TPtrC(path.utf16(), path.length()));
-    TFileName subFileDes(TPtrC(htmlFile.utf16(), htmlFile.length()));
-    FixPathSlash(zipNameDes);
-    FixPathSlash(subFileDes);
-
-    htmlContent.clear(); // clear all data
-
-    QT_TRAP_THROWING(LoadFileFromZipL(zipNameDes, subFileDes, htmlContent));
-    }
-#else
-void HelpUtils::loadHtmlFromZipFile(const QString& path, const QString& htmlFile, QString& htmlContent)
-{
-	Q_UNUSED(path);
-	Q_UNUSED(htmlFile);
-	Q_UNUSED(htmlContent);
-	return;
-}
-#endif
-
-QString HelpUtils::rootPath()
-{
-	return QString("z:/");
-}
-
-QString HelpUtils::UILocaleFromQtToSymbian()
-{
-#ifdef Q_OS_SYMBIAN
-
-	static QMap<QString, int> iso_to_symbian_map;
-	iso_to_symbian_map.insert("en_GB" ,ELangEnglish);             
-	iso_to_symbian_map.insert("fr_FR" ,ELangFrench);              
-	iso_to_symbian_map.insert("de_DE" ,ELangGerman);              
-	iso_to_symbian_map.insert("es_ES" ,ELangSpanish);             
-	iso_to_symbian_map.insert("it_IT" ,ELangItalian);             
-	iso_to_symbian_map.insert("sv_SE" ,ELangSwedish);             
-	iso_to_symbian_map.insert("da_DK" ,ELangDanish);              
-	iso_to_symbian_map.insert("no_NO" ,ELangNorwegian);           
-	iso_to_symbian_map.insert("fi_FI" ,ELangFinnish);             
-	iso_to_symbian_map.insert("en_US" ,ELangAmerican);            
-	iso_to_symbian_map.insert("fr_CH" ,ELangSwissFrench);         
-	iso_to_symbian_map.insert("de_CH" ,ELangSwissGerman);         
-	iso_to_symbian_map.insert("pt_PT" ,ELangPortuguese);          
-	iso_to_symbian_map.insert("tr_TR" ,ELangTurkish);             
-	iso_to_symbian_map.insert("is_IS" ,ELangIcelandic);           
-	iso_to_symbian_map.insert("ru_RU" ,ELangRussian);             
-	iso_to_symbian_map.insert("hu_HU" ,ELangHungarian);           
-	iso_to_symbian_map.insert("nl_NL" ,ELangDutch);               
-	iso_to_symbian_map.insert("nl_BE" ,ELangBelgianFlemish);      
-	iso_to_symbian_map.insert("en_AU" ,ELangAustralian);          
-	iso_to_symbian_map.insert("fr_BE" ,ELangBelgianFrench);       
-	iso_to_symbian_map.insert("de_AT" ,ELangAustrian);            
-	iso_to_symbian_map.insert("en_NZ" ,ELangNewZealand);          
-	iso_to_symbian_map.insert("fr"    ,ELangInternationalFrench); 
-	iso_to_symbian_map.insert("cs_CZ" ,ELangCzech);               
-	iso_to_symbian_map.insert("sk_SK" ,ELangSlovak);              
-	iso_to_symbian_map.insert("pl_PL" ,ELangPolish);              
-	iso_to_symbian_map.insert("sl_SI" ,ELangSlovenian);           
-	iso_to_symbian_map.insert("zh_TW" ,ELangTaiwanChinese);       
-	iso_to_symbian_map.insert("zh_HK" ,ELangHongKongChinese);     
-	iso_to_symbian_map.insert("zh_CN" ,ELangPrcChinese);          
-	iso_to_symbian_map.insert("ja_JP" ,ELangJapanese);            
-	iso_to_symbian_map.insert("th_TH" ,ELangThai);                
-	iso_to_symbian_map.insert("af"    ,ELangAfrikaans);           
-	iso_to_symbian_map.insert("sq_AL" ,ELangAlbanian);            
-	iso_to_symbian_map.insert("am_ET" ,ELangAmharic);             
-	iso_to_symbian_map.insert("ar_AE" ,ELangArabic);              
-	iso_to_symbian_map.insert("hy_AM" ,ELangArmenian);            
-	iso_to_symbian_map.insert("tl_PH" ,ELangTagalog);             
-	iso_to_symbian_map.insert("be_BY" ,ELangBelarussian);         
-	iso_to_symbian_map.insert("bn"    ,ELangBengali);             
-	iso_to_symbian_map.insert("bg_BG" ,ELangBulgarian);           
-	iso_to_symbian_map.insert("my_MM" ,ELangBurmese);             
-	iso_to_symbian_map.insert("ca_ES" ,ELangCatalan);             
-	iso_to_symbian_map.insert("hr_HR" ,ELangCroatian);            
-	iso_to_symbian_map.insert("en_CA" ,ELangCanadianEnglish);     
-	iso_to_symbian_map.insert( "en"   ,ELangInternationalEnglish);
-	iso_to_symbian_map.insert("en_ZA" ,ELangSouthAfricanEnglish); 
-	iso_to_symbian_map.insert("et_EE" ,ELangEstonian);            
-	iso_to_symbian_map.insert("fa_IR" ,ELangFarsi);               
-	iso_to_symbian_map.insert("fr_CA" ,ELangCanadianFrench);      
-	iso_to_symbian_map.insert("gd_GB" ,ELangScotsGaelic);         
-	iso_to_symbian_map.insert("ka_GE" ,ELangGeorgian);            
-	iso_to_symbian_map.insert("el_GR" ,ELangGreek);               
-	iso_to_symbian_map.insert("el_GR" ,ELangCyprusGreek);         
-	iso_to_symbian_map.insert("gu_IN" ,ELangGujarati);            
-	iso_to_symbian_map.insert("he_IL" ,ELangHebrew);              
-	iso_to_symbian_map.insert("hi_IN" ,ELangHindi);               
-	iso_to_symbian_map.insert("id_ID" ,ELangIndonesian);          
-	iso_to_symbian_map.insert("ga_IE" ,ELangIrish);               
-	iso_to_symbian_map.insert("it_CH" ,ELangSwissItalian);        
-	iso_to_symbian_map.insert("kn_IN" ,ELangKannada);             
-	iso_to_symbian_map.insert("kk_KZ" ,ELangKazakh);              
-	iso_to_symbian_map.insert("km_KH" ,ELangKhmer);               
-	iso_to_symbian_map.insert("ko_KR" ,ELangKorean);              
-	iso_to_symbian_map.insert("lo_LA" ,ELangLao);                 
-	iso_to_symbian_map.insert("lv_LV" ,ELangLatvian);             
-	iso_to_symbian_map.insert("lt_LT" ,ELangLithuanian);          
-	iso_to_symbian_map.insert("mk_MK" ,ELangMacedonian);          
-	iso_to_symbian_map.insert("ms_MY" ,ELangMalay);               
-	iso_to_symbian_map.insert("ml_IN" ,ELangMalayalam);           
-	iso_to_symbian_map.insert("mr_IN" ,ELangMarathi);             
-	iso_to_symbian_map.insert("mo_MD" ,ELangMoldavian);           
-	iso_to_symbian_map.insert("mn_MN" ,ELangMongolian);           
-	iso_to_symbian_map.insert("nn_NO" ,ELangNorwegianNynorsk);    
-	iso_to_symbian_map.insert("pt_BR" ,ELangBrazilianPortuguese); 
-	iso_to_symbian_map.insert("pa"    ,ELangPunjabi);             
-	iso_to_symbian_map.insert("ro_RO" ,ELangRomanian);            
-	iso_to_symbian_map.insert("sr_YU" ,ELangSerbian);             
-	iso_to_symbian_map.insert("si_LK" ,ELangSinhalese);           
-	iso_to_symbian_map.insert("so_SO" ,ELangSomali);              
-	iso_to_symbian_map.insert( "es"   ,ELangInternationalSpanish);
-	iso_to_symbian_map.insert( "es"   ,ELangLatinAmericanSpanish);
-	iso_to_symbian_map.insert("sw"    ,ELangSwahili);             
-	iso_to_symbian_map.insert("sv_FI" ,ELangFinlandSwedish);      
-	iso_to_symbian_map.insert("ta_IN" ,ELangTamil);               
-	iso_to_symbian_map.insert("te_IN" ,ELangTelugu);              
-	iso_to_symbian_map.insert("bo_CN" ,ELangTibetan);             
-	iso_to_symbian_map.insert("ti_ER" ,ELangTigrinya);            
-	iso_to_symbian_map.insert("tr_GR" ,ELangCyprusTurkish);       
-	iso_to_symbian_map.insert("tk_TM" ,ELangTurkmen);             
-	iso_to_symbian_map.insert("uk_UA" ,ELangUkrainian);           
-	iso_to_symbian_map.insert("ur_PK" ,ELangUrdu);                
-	iso_to_symbian_map.insert("vi_VN" ,ELangVietnamese);          
-	iso_to_symbian_map.insert("cy_GB" ,ELangWelsh);               
-	iso_to_symbian_map.insert("zu_ZA" ,ELangZulu);                
-	iso_to_symbian_map.insert("st_LS" ,ELangSouthSotho);          
-	iso_to_symbian_map.insert("eu_ES" ,ELangBasque);       
-	iso_to_symbian_map.insert("gl_ES" ,ELangGalician);                          
-	iso_to_symbian_map.insert("en"    ,ELangEnglish_Apac);                
-	iso_to_symbian_map.insert("en_TW" ,ELangEnglish_Taiwan);              
-	iso_to_symbian_map.insert("en_HK" ,ELangEnglish_HongKong);                          
-	iso_to_symbian_map.insert("en_CN" ,ELangEnglish_Prc);         
-	iso_to_symbian_map.insert("en_JP" ,ELangEnglish_Japan);       
-	iso_to_symbian_map.insert("en_TH" ,ELangEnglish_Thailand);     
-	iso_to_symbian_map.insert("ms"    ,ELangMalay_Apac); 
-
-	QString langName = QLocale::system().name();
-	return QString("%1").arg(iso_to_symbian_map.value(langName),2,10,QChar('0'));
-#else
-	return QString("%1").arg(1,2,10,QChar('0'));
-#endif
-}
-
-int HelpUtils::launchApplication(const QString& appUid)
-{
-#ifdef Q_OS_SYMBIAN
-
-    QString uriStr("appto://");
-    uriStr.append(appUid);
-    QUrl uri(uriStr); 
-    
-    XQApplicationManager appmgr;
-    XQAiwRequest* req5 = appmgr.create(uri, false);
-    
-    QList<QVariant> args;
-    args << uri.encodedQuery();
-    req5->setArguments(args);
-    
-    if (!req5->send())
-    {
-        return req5->lastError();
-    }
-#else
-	Q_UNUSED(appUid);
-#endif
-    return 0;
-}
-
-bool HelpUtils::suppportFeatureID(int featureID)
-{
-#ifdef Q_OS_SYMBIAN
-	if(featureID == -1)
-	{
-		return true;
-	}
-    QtMobility::QSystemInfo sysInfo;
-	return sysInfo.hasFeatureSupported((QtMobility::QSystemInfo::Feature)featureID);
-#else
-	Q_UNUSED(featureID);
-	return true;
-#endif
-}
-
-Qt::Orientation HelpUtils::defaultOrientation()
-{
-	return Qt::Vertical;
-}
-
-Qt::SortOrder HelpUtils::sortOrder()
-{
-	return Qt::AscendingOrder;
-}
-
-int HelpUtils::findStr(const QString& strFrom, const QString& strToFind)
-{
-	return HbStringUtil::findC(strFrom, strToFind);
-}
-
-int HelpUtils::compareStr(const QString& str1, const QString& str2)
-{
-	return HbStringUtil::compareC(str1, str2);
-}
-
-// end of file
--- a/userguide/src/HelpUtils_win.cpp	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include "HelpUtils.h"
-
-void HelpUtils::loadHtmlFromZipFile(const QString& path, const QString& htmlFile, QString& htmlContent)
-{
-	Q_UNUSED(path);
-	Q_UNUSED(htmlFile);
-	Q_UNUSED(htmlContent);
-	return;
-}
-
--- a/userguide/src/main.cpp	Tue Aug 31 15:06:12 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*
-*/
-
-#include <QTranslator>
-#include <QtGlobal>
-#include <QLocale>
-
-#include <hbapplication.h>
-
-#include "HelpCommon.h"
-#include "HelpMainWindow.h"
-
-int main(int argc, char *argv[])
-{
-    HbApplication app(argc, argv);
-
-    QString lang = QLocale::system().name();
-    
-    // init translator with current system language
-    QTranslator* translatorCommon = new QTranslator();
-    translatorCommon->load("common_"+lang, PATH_TRANSLATIONS);
-    qApp->installTranslator(translatorCommon);
-    
-    QTranslator* translatorSelf = new QTranslator();    
-    translatorSelf->load("userguide_"+lang, PATH_TRANSLATIONS);
-    qApp->installTranslator(translatorSelf);
-
-	HelpMainWindow mainWindow;
-	mainWindow.show();
-
-    return app.exec();
-}
-
-// end of file