diff -r 000000000000 -r 1f04cf54edd8 csxhelp/HelpEngine/inc/CSXHHelpContentBase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/csxhelp/HelpEngine/inc/CSXHHelpContentBase.h Tue Jan 26 15:15:23 2010 +0200 @@ -0,0 +1,93 @@ +/* +* 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 +#include + +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; + + protected: +/** +* @function CCSXHHelpContentBase +* @since S60 3.2 +* Construct a CCSXHHelpContentBase +* @param aName - Name +*/ + CCSXHHelpContentBase(const TDesC& name); + + private: + // 1. For Generic TOC1: The TOC1 entry name + // 2. For Generic TOC2: The TOC2 entry name + // 3. For help database: Unused + //TBuf iName; + //typedef TBuf<30> TCoeContextName; + + HBufC *iName; + + template + friend TInt Orderer(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 +TInt Orderer(const T& left, const T& right) + { + //return left.GetName().CompareC(right.GetName()); + return (left.iName)->CompareC(*right.iName); + } + +#endif /* INC_CSXHHELPCONTENTBASE_H_HEADER_INCLUDED_BC0553D0 */