williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@4
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@4
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description:
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*/
|
williamr@2
|
17 |
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#ifndef MCLFMODIFIABLEITEM_H
|
williamr@2
|
20 |
#define MCLFMODIFIABLEITEM_H
|
williamr@2
|
21 |
|
williamr@2
|
22 |
// INCLUDES
|
williamr@2
|
23 |
#include <MCLFItem.h>
|
williamr@2
|
24 |
|
williamr@2
|
25 |
// FORWARD DECLARATIONS
|
williamr@2
|
26 |
class MCLFModifiableItemExt;
|
williamr@2
|
27 |
|
williamr@2
|
28 |
// CLASS DECLARATION
|
williamr@2
|
29 |
|
williamr@2
|
30 |
/**
|
williamr@2
|
31 |
* Modifiable item for Content Listing Framework.
|
williamr@2
|
32 |
* Use ContentListingFactory to create modifiable items. These new items are
|
williamr@2
|
33 |
* used as groups in the custom grouper (see MCLFCustomGrouper). Modifiable
|
williamr@2
|
34 |
* item is like MCLFItem but you can add new fields to the modifiable item.
|
williamr@2
|
35 |
* One item can contain multiple fields, but normally it is not needed in
|
williamr@2
|
36 |
* a custom grouper. The field consists of a Field ID and field data. Type
|
williamr@2
|
37 |
* of the field is defined with Field ID. See TCLFDefaultFieldId in
|
williamr@2
|
38 |
* CLFContentListing.hrh.<br><br>
|
williamr@2
|
39 |
* Example:
|
williamr@2
|
40 |
* @code
|
williamr@2
|
41 |
* // Create a modifiable item and add one string field to it.
|
williamr@2
|
42 |
* // Field id is ECLFFieldIdArtist and field value is "test".
|
williamr@2
|
43 |
* _LIT( KTest, "test" );
|
williamr@2
|
44 |
* MCLFModifiableItem* item = ContentListingFactory::NewModifiableItemLC();
|
williamr@2
|
45 |
* item->AddFieldL( ECLFFieldIdArtist, KTest );
|
williamr@2
|
46 |
* CleanupStack::Pop(); // item
|
williamr@2
|
47 |
* @endcode
|
williamr@2
|
48 |
*
|
williamr@2
|
49 |
* @lib ContentListingFramework.lib
|
williamr@2
|
50 |
* @since S60 3.1
|
williamr@2
|
51 |
*/
|
williamr@2
|
52 |
class MCLFModifiableItem : public MCLFItem
|
williamr@2
|
53 |
{
|
williamr@2
|
54 |
public: // Destructor
|
williamr@2
|
55 |
/**
|
williamr@2
|
56 |
* Destructor.
|
williamr@2
|
57 |
*/
|
williamr@2
|
58 |
virtual ~MCLFModifiableItem() {}
|
williamr@2
|
59 |
|
williamr@2
|
60 |
public: // New functions
|
williamr@2
|
61 |
|
williamr@2
|
62 |
/**
|
williamr@2
|
63 |
* Add new string field to the item.
|
williamr@2
|
64 |
* @since S60 3.1
|
williamr@2
|
65 |
* @param aFieldId Field ID
|
williamr@2
|
66 |
* @param aValue Field value
|
williamr@2
|
67 |
*/
|
williamr@2
|
68 |
virtual void AddFieldL( TCLFFieldId aFieldId,
|
williamr@2
|
69 |
const TDesC& aValue ) = 0;
|
williamr@2
|
70 |
|
williamr@2
|
71 |
/**
|
williamr@2
|
72 |
* Add new integer field to the item.
|
williamr@2
|
73 |
* @since S60 3.1
|
williamr@2
|
74 |
* @param aFieldId Field ID
|
williamr@2
|
75 |
* @param aValue Field value
|
williamr@2
|
76 |
*/
|
williamr@2
|
77 |
virtual void AddFieldL( TCLFFieldId aFieldId,
|
williamr@2
|
78 |
TInt32 aValue ) = 0;
|
williamr@2
|
79 |
|
williamr@2
|
80 |
/**
|
williamr@2
|
81 |
* Add new time field to the item.
|
williamr@2
|
82 |
* @since S60 3.1
|
williamr@2
|
83 |
* @param aFieldId Field ID
|
williamr@2
|
84 |
* @param aValue Field value
|
williamr@2
|
85 |
*/
|
williamr@2
|
86 |
virtual void AddFieldL( TCLFFieldId aFieldId,
|
williamr@2
|
87 |
const TTime& aValue ) = 0;
|
williamr@2
|
88 |
|
williamr@2
|
89 |
private: // Extension interface
|
williamr@2
|
90 |
|
williamr@2
|
91 |
/**
|
williamr@2
|
92 |
* This member is internal and not intended for use.
|
williamr@2
|
93 |
*/
|
williamr@2
|
94 |
virtual MCLFModifiableItemExt* ModifiableItemExtension() { return NULL; }
|
williamr@2
|
95 |
|
williamr@2
|
96 |
};
|
williamr@2
|
97 |
|
williamr@2
|
98 |
#endif // MCLFMODIFIABLEITEM_H
|
williamr@2
|
99 |
|
williamr@2
|
100 |
// End of File
|