2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #ifndef MCLFMODIFIABLEITEM_H
20 #define MCLFMODIFIABLEITEM_H
25 // FORWARD DECLARATIONS
26 class MCLFModifiableItemExt;
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>
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
49 * @lib ContentListingFramework.lib
52 class MCLFModifiableItem : public MCLFItem
58 virtual ~MCLFModifiableItem() {}
60 public: // New functions
63 * Add new string field to the item.
65 * @param aFieldId Field ID
66 * @param aValue Field value
68 virtual void AddFieldL( TCLFFieldId aFieldId,
69 const TDesC& aValue ) = 0;
72 * Add new integer field to the item.
74 * @param aFieldId Field ID
75 * @param aValue Field value
77 virtual void AddFieldL( TCLFFieldId aFieldId,
81 * Add new time field to the item.
83 * @param aFieldId Field ID
84 * @param aValue Field value
86 virtual void AddFieldL( TCLFFieldId aFieldId,
87 const TTime& aValue ) = 0;
89 private: // Extension interface
92 * This member is internal and not intended for use.
94 virtual MCLFModifiableItemExt* ModifiableItemExtension() { return NULL; }
98 #endif // MCLFMODIFIABLEITEM_H