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 MCLFPOSTFILTER_H
20 #define MCLFPOSTFILTER_H
25 // FORWARD DECLARATIONS
26 class MCLFPostFilterExt;
32 * Post filter interface for Content Listing Framework.
33 * With this interface client you can add own post filter to
34 * exclude items from list model.<br><br>
37 * // This example filters items by drive letter:
38 * // Items that are in phone memory are included to the list model.
39 * // All other items will be filtered.
40 * void CMyFilter::FilterItemsL( const TArray<MCLFItem*>& aItemList,
41 * RPointerArray<MCLFItem>& aFilteredItemList )
43 * TCharF phoneMemory( PathInfo::PhoneMemoryRootPath()[0] );
44 * TInt count( aItemList.Count() );
45 * for( TInt i = 0 ; i < count ; ++i )
48 * MCLFItem* item = aItemList[i];
49 * TInt error( item->GetField( ECLFFieldIdDrive, ptr ) );
50 * if( error == KErrNone )
52 * TCharF memory( ptr[0] );
53 * if( memory == phoneMemory )
55 * aFilteredItemList.AppendL( item );
61 * @lib ContentListingFramework.lib
66 public: // New functions
69 * Abstract method to filter source list. This method is called when
70 * the filtering process is executed by list model refresh.
72 * @param aItemList Source list, contains all items that are in
74 * @param aFilteredItemList Filtered/destination list, contains all items
75 that will be in the list model after filtering.
77 virtual void FilterItemsL( const TArray<MCLFItem*>& aItemList,
78 RPointerArray<MCLFItem>& aFilteredItemList ) = 0;
85 virtual ~MCLFPostFilter() {}
87 private: // Extension interface
90 * This member is internal and not intended for use.
92 virtual MCLFPostFilterExt* Extension() { return NULL; }
97 #endif // MCLFPOSTFILTER_H