|
1 /* |
|
2 * Copyright (c) 2002-2009 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 #ifndef MCLFMODIFIABLEITEM_H |
|
20 #define MCLFMODIFIABLEITEM_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <MCLFItem.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class MCLFModifiableItemExt; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * Modifiable item for Content Listing Framework. |
|
32 * Use ContentListingFactory to create modifiable items. These new items are |
|
33 * used as groups in the custom grouper (see MCLFCustomGrouper). Modifiable |
|
34 * item is like MCLFItem but you can add new fields to the modifiable item. |
|
35 * One item can contain multiple fields, but normally it is not needed in |
|
36 * a custom grouper. The field consists of a Field ID and field data. Type |
|
37 * of the field is defined with Field ID. See TCLFDefaultFieldId in |
|
38 * CLFContentListing.hrh.<br><br> |
|
39 * Example: |
|
40 * @code |
|
41 * // Create a modifiable item and add one string field to it. |
|
42 * // Field id is ECLFFieldIdArtist and field value is "test". |
|
43 * _LIT( KTest, "test" ); |
|
44 * MCLFModifiableItem* item = ContentListingFactory::NewModifiableItemLC(); |
|
45 * item->AddFieldL( ECLFFieldIdArtist, KTest ); |
|
46 * CleanupStack::Pop(); // item |
|
47 * @endcode |
|
48 * |
|
49 * @lib ContentListingFramework.lib |
|
50 * @since S60 3.1 |
|
51 */ |
|
52 class MCLFModifiableItem : public MCLFItem |
|
53 { |
|
54 public: // Destructor |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~MCLFModifiableItem() {} |
|
59 |
|
60 public: // New functions |
|
61 |
|
62 /** |
|
63 * Add new string field to the item. |
|
64 * @since S60 3.1 |
|
65 * @param aFieldId Field ID |
|
66 * @param aValue Field value |
|
67 */ |
|
68 virtual void AddFieldL( TCLFFieldId aFieldId, |
|
69 const TDesC& aValue ) = 0; |
|
70 |
|
71 /** |
|
72 * Add new integer field to the item. |
|
73 * @since S60 3.1 |
|
74 * @param aFieldId Field ID |
|
75 * @param aValue Field value |
|
76 */ |
|
77 virtual void AddFieldL( TCLFFieldId aFieldId, |
|
78 TInt32 aValue ) = 0; |
|
79 |
|
80 /** |
|
81 * Add new time field to the item. |
|
82 * @since S60 3.1 |
|
83 * @param aFieldId Field ID |
|
84 * @param aValue Field value |
|
85 */ |
|
86 virtual void AddFieldL( TCLFFieldId aFieldId, |
|
87 const TTime& aValue ) = 0; |
|
88 |
|
89 private: // Extension interface |
|
90 |
|
91 /** |
|
92 * This member is internal and not intended for use. |
|
93 */ |
|
94 virtual MCLFModifiableItemExt* ModifiableItemExtension() { return NULL; } |
|
95 |
|
96 }; |
|
97 |
|
98 #endif // MCLFMODIFIABLEITEM_H |
|
99 |
|
100 // End of File |