author | William Roberts <williamr@symbian.org> |
Tue, 16 Mar 2010 16:12:26 +0000 | |
branch | Symbian2 |
changeset 2 | 2fe1408b6811 |
parent 1 | 666f914201fb |
child 4 | 837f303aceeb |
permissions | -rw-r--r-- |
2
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
1 |
/* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
2 |
* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
3 |
* All rights reserved. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
5 |
* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
7 |
* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
8 |
* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
9 |
* Initial Contributors: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
11 |
* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
12 |
* Contributors: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
13 |
* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
14 |
* Description: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
15 |
* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
16 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
17 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
18 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
19 |
#ifndef MCLFCUSTOMGROUPER_H |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
20 |
#define MCLFCUSTOMGROUPER_H |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
21 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
22 |
// INCLUDES |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
23 |
#include <e32std.h> |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
24 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
25 |
// FORWARD DECLARATIONS |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
26 |
class MCLFCustomGrouperExt; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
27 |
class MCLFItem; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
28 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
29 |
// CLASS DECLARATION |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
30 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
31 |
/** |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
32 |
* Custom grouper interface of Content Listing Framework. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
33 |
* With this interface, client can add own custom grouper |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
34 |
* to its List Model. Custom grouper is used for grouping list model items. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
35 |
* For example, List Model of music files can be grouped by genre or artist |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
36 |
* name by using this interface. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
37 |
* Use ContentListingFactory to create items for new groups (MCLFModifiableItem). |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
38 |
* <br><br> |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
39 |
* Example: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
40 |
* @code |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
41 |
* // This grouper will overwrite the source list and add three items to model. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
42 |
* void CMyGrouper::GroupItemsL( const TArray<MCLFItem*>& aSourceList, |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
43 |
* RPointerArray<MCLFItem>& aGroupedList ) |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
44 |
* { |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
45 |
* _LIT( KTest, "test" ); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
46 |
* MCLFModifiableItem* item = ContentListingFactory::NewModifiableItemLC(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
47 |
* item->AddFieldL( ECLFFieldIdName, KTest ); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
48 |
* aGroupedList.AppendL( item ); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
49 |
* CleanupStack::Pop(); // item |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
50 |
* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
51 |
* _LIT( KTest1, "test1" ); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
52 |
* item = ContentListingFactory::NewModifiableItemLC(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
53 |
* item->AddFieldL( ECLFFieldIdName, KTest1 ); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
54 |
* aGroupedList.AppendL( item ); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
55 |
* CleanupStack::Pop(); // item |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
56 |
* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
57 |
* _LIT( KTest2, "test2" ); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
58 |
* item = ContentListingFactory::NewModifiableItemLC(); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
59 |
* item->AddFieldL( ECLFFieldIdName, KTest2 ); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
60 |
* aGroupedList.AppendL( item ); |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
61 |
* CleanupStack::Pop(); // item |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
62 |
* } |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
63 |
* @endcode |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
64 |
* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
65 |
* Custom grouper is activated and removed by calling method |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
66 |
* MCLFItemListModel::SetCustomGrouper |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
67 |
* |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
68 |
* @lib ContentListingFramework.lib |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
69 |
* @since S60 3.1 |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
70 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
71 |
class MCLFCustomGrouper |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
72 |
{ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
73 |
public: // New functions |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
74 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
75 |
/** |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
76 |
* Abstract method for grouping Content Listing Framework items of |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
77 |
* list models. This method is called when the grouping process is |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
78 |
* executed by refreshing the model. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
79 |
* @since S60 3.1 |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
80 |
* @param aSourceList Source list. Contains all items that are in |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
81 |
* the list model when the grouping process starts. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
82 |
* @param aGroupedList Grouped/destination list. While grouping, each |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
83 |
* group should be added to this list. The list model will |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
84 |
* contain only these items when the grouping process is |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
85 |
* finished. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
86 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
87 |
virtual void GroupItemsL( const TArray<MCLFItem*>& aSourceList, |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
88 |
RPointerArray<MCLFItem>& aGroupedList ) = 0; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
89 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
90 |
protected: |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
91 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
92 |
/** |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
93 |
* Destructor. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
94 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
95 |
virtual ~MCLFCustomGrouper() {} |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
96 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
97 |
private: // Extension interface |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
98 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
99 |
/** |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
100 |
* This member is internal and not intended for use. |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
101 |
*/ |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
102 |
virtual MCLFCustomGrouperExt* Extension() { return NULL; } |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
103 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
104 |
}; |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
105 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
106 |
#endif // MCLFCUSTOMGROUPER_H |
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
107 |
|
2fe1408b6811
Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents:
1
diff
changeset
|
108 |
// End of File |