csxhelp/HelpEngine/src/CSXHLegacyTOC2.cpp
changeset 0 1f04cf54edd8
equal deleted inserted replaced
-1:000000000000 0:1f04cf54edd8
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  CCSXHLegacyTOC2 class definition
       
    15 *
       
    16 */
       
    17 
       
    18 #include "CSXHLegacyTOC2.h"
       
    19 #include "CSXHViewIDs.h"
       
    20 #include "CSXHGenericTOC1.h"
       
    21 #include "CSXHLegacyContentParser.h"
       
    22 #include "CSXHHelpDataBase.h"
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 CCSXHLegacyTOC2* CCSXHLegacyTOC2::NewL(CCSXHGenericTOC1* aParent,const
       
    27 TDesC& aName,TBool aKey)
       
    28     {
       
    29     CCSXHLegacyTOC2* self = CCSXHLegacyTOC2::NewLC(aParent,aName,aKey);
       
    30     CleanupStack::Pop(self);
       
    31     return self;
       
    32     }
       
    33 
       
    34 CCSXHLegacyTOC2* CCSXHLegacyTOC2::NewLC(CCSXHGenericTOC1* aParent,const
       
    35 TDesC& aName,TBool aKey)
       
    36     {
       
    37     CCSXHLegacyTOC2* self = new(ELeave) CCSXHLegacyTOC2(aParent,aName,aKey);
       
    38     CleanupStack::PushL(self);
       
    39     return self;
       
    40     }
       
    41 
       
    42 
       
    43 CCSXHLegacyTOC2::CCSXHLegacyTOC2(CCSXHGenericTOC1* aParent,const TDesC& aName,TBool aKey) :
       
    44 CCSXHGenericTOC2(aParent,aName),iKeyWordTopic (aKey)
       
    45     {//No implementation required
       
    46     }
       
    47 
       
    48 TUid CCSXHLegacyTOC2::GetViewID() const
       
    49     {
       
    50     return KCSXHLegacyTopicViewID;
       
    51     }
       
    52     
       
    53 EXPORT_C TAny* CCSXHLegacyTOC2::GetTopicContentL()
       
    54     {
       
    55     
       
    56     return CCSXHHelpDataBase::GetInstance()->GetLegacyParser()->GetTopicContentL(this);
       
    57     //return NULL;
       
    58     }
       
    59 
       
    60 EXPORT_C  CCSXHLegacyTOC1* CCSXHLegacyTOC2::GetLegacyParent()
       
    61     {
       
    62     if(!iKeyWordTopic)
       
    63         return NULL;
       
    64     return CCSXHHelpDataBase::GetInstance()->GetLegacyParser()->GetTOC1ForTOC2(this);
       
    65     }