|
1 /* |
|
2 * Copyright (c) 2007-2008 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_HN_ITEM_FILTER_H |
|
21 #define C_HN_ITEM_FILTER_H |
|
22 |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <s32file.h> |
|
26 #include <s32mem.h> |
|
27 |
|
28 |
|
29 /** |
|
30 * Item Id. |
|
31 * |
|
32 * This class represtnets the id of the item. |
|
33 * It comprises a file name in which the item was defined |
|
34 * and the numerical identifier. |
|
35 * |
|
36 * @lib hnmetadatamodel |
|
37 * @since S60 v3.2 |
|
38 * @ingroup group_hnmetadatamodel |
|
39 */ |
|
40 NONSHARABLE_CLASS(CHnItemId) : |
|
41 public CBase |
|
42 { |
|
43 public: |
|
44 /** |
|
45 * Standard factory method. |
|
46 * |
|
47 * since S60 v5.0 |
|
48 * @param aFile File name. |
|
49 * @param aID Item's numerical identifier. |
|
50 * @return Fully constructed object. |
|
51 */ |
|
52 IMPORT_C static CHnItemId* NewL( const TDesC& aFile, |
|
53 const TDesC& aID ); |
|
54 |
|
55 /** |
|
56 * Standard factory method. |
|
57 * |
|
58 * since S60 v5.0 |
|
59 * @param aFile File name. |
|
60 * @param aID Item's numerical identifier. |
|
61 * @return Fully constructed object. |
|
62 */ |
|
63 IMPORT_C static CHnItemId* NewLC(const TDesC& aFile, |
|
64 const TDesC& aID ); |
|
65 |
|
66 /** |
|
67 * Standard factory method. |
|
68 * |
|
69 * since S60 v5.0 |
|
70 * @param aItemId Item id. |
|
71 * @return Fully constructed object. |
|
72 */ |
|
73 IMPORT_C void UpdateL(const CHnItemId & aItemId ); |
|
74 |
|
75 /** |
|
76 * Default destructor |
|
77 */ |
|
78 ~CHnItemId(); |
|
79 |
|
80 /** |
|
81 * Get suite name. |
|
82 * |
|
83 * @return Suite's name. |
|
84 */ |
|
85 IMPORT_C const TDesC& SuiteName() const; |
|
86 |
|
87 /** |
|
88 * Returns Id. |
|
89 * |
|
90 * @return Textual identifier. |
|
91 */ |
|
92 IMPORT_C const TDesC& Id() const; |
|
93 |
|
94 /** |
|
95 * Compares fileName to filter. |
|
96 * |
|
97 * @param aItemId Item id. |
|
98 * @return True if aItemId is equal to current item id (this). |
|
99 */ |
|
100 IMPORT_C TBool Compare( const CHnItemId& aItemId ) const; |
|
101 |
|
102 private: |
|
103 |
|
104 /** |
|
105 * default constructor |
|
106 */ |
|
107 CHnItemId(); |
|
108 |
|
109 /** |
|
110 * EPOC default constructor for performing 2nd stage construction |
|
111 * |
|
112 * @param aFile File name. |
|
113 * @param aID Textual identifier of an item. |
|
114 */ |
|
115 void ConstructL( const TDesC& aFile, const TDesC& aID ); |
|
116 |
|
117 private: // data |
|
118 |
|
119 /** |
|
120 * Own - Filename. |
|
121 */ |
|
122 RBuf iSuiteName; |
|
123 |
|
124 /** |
|
125 * Own - Id. |
|
126 */ |
|
127 RBuf iId; |
|
128 |
|
129 }; |
|
130 |
|
131 #endif //C_HN_ITEM_FILTER_H |