|
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: CCSXHHelpContentBase class declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef INC_CSXHHELPCONTENTBASE_H_HEADER_INCLUDED_BC0553D0 |
|
20 #define INC_CSXHHELPCONTENTBASE_H_HEADER_INCLUDED_BC0553D0 |
|
21 |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 |
|
25 const TInt KMaxHelpTopicName = 30; |
|
26 /** |
|
27 * @class CCSXHGenericTOC1 |
|
28 * This class is the base class for GenericTOC1 & GenericTOC2 |
|
29 */ |
|
30 class CCSXHHelpContentBase : public CBase |
|
31 { |
|
32 public: |
|
33 /** |
|
34 * @function ~CCSXHHelpContentBase |
|
35 * @since S60 3.2 |
|
36 * Destroy the object and release all memory objects |
|
37 */ |
|
38 virtual ~CCSXHHelpContentBase(); |
|
39 |
|
40 /** |
|
41 * @function GetViewID |
|
42 * @since S60 3.2 |
|
43 * Get ViewId to activate the View |
|
44 * @return View Id |
|
45 */ |
|
46 IMPORT_C virtual TUid GetViewID() const = 0; |
|
47 |
|
48 /** |
|
49 * @function GetName |
|
50 * @since S60 3.2 |
|
51 * Get the name |
|
52 * @return Pointer which contains Name |
|
53 */ |
|
54 IMPORT_C TPtr GetName() const; |
|
55 |
|
56 protected: |
|
57 /** |
|
58 * @function CCSXHHelpContentBase |
|
59 * @since S60 3.2 |
|
60 * Construct a CCSXHHelpContentBase |
|
61 * @param aName - Name |
|
62 */ |
|
63 CCSXHHelpContentBase(const TDesC& name); |
|
64 |
|
65 private: |
|
66 // 1. For Generic TOC1: The TOC1 entry name |
|
67 // 2. For Generic TOC2: The TOC2 entry name |
|
68 // 3. For help database: Unused |
|
69 //TBuf<KMaxHelpTopicName> iName; |
|
70 //typedef TBuf<30> TCoeContextName; |
|
71 |
|
72 HBufC *iName; |
|
73 |
|
74 template <class T> |
|
75 friend TInt Orderer(const T& left, const T& right); |
|
76 |
|
77 }; |
|
78 /** |
|
79 * @function Orderer |
|
80 * @since S60 3.2 |
|
81 * template function used to compare between two objects |
|
82 * @param left - template object |
|
83 * right - template object |
|
84 * @return 0 if both are same, +ve or -ve Values as per Comparision |
|
85 */ |
|
86 template <class T> |
|
87 TInt Orderer(const T& left, const T& right) |
|
88 { |
|
89 //return left.GetName().CompareC(right.GetName()); |
|
90 return (left.iName)->CompareC(*right.iName); |
|
91 } |
|
92 |
|
93 #endif /* INC_CSXHHELPCONTENTBASE_H_HEADER_INCLUDED_BC0553D0 */ |