|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : CCEPostFilter.h 00004 * Part of : Content Listing Framework Sample Application 00005 * Interface : 00006 * Description : 00007 * Version : 00008 * 00009 * Copyright (c) 2006 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. 00013 * ============================================================================== 00014 */ 00015 00016 00017 #ifndef __CCEPOSTFILTER_H__ 00018 #define __CCEPOSTFILTER_H__ 00019 00020 // INCLUDES 00021 #include <e32base.h> 00022 #include <e32std.h> 00023 #include <MCLFPostFilter.h> 00024 #include <CLFContentListing.hrh> 00025 00026 // FORWARD DECLARATIONS 00027 class MCLFItem; 00028 00029 // CLASS DECLARATION 00030 00031 /** 00032 * CLF Post Filter. 00033 * Example of Post Filter that can be used to filter items from the 00034 * list model. With post filter your can select, which kind of items are 00035 * excluded from the list model. For example, you can include only music 00036 * files of some specific artist and remove all other items. 00037 */ 00038 class CCEPostFilter 00039 : public CBase, 00040 public MCLFPostFilter 00041 { 00042 public: // Constructors and destructor 00043 00044 /** 00045 * Creates and returns a new instance of this class. 00046 * @param aFilterCriteria Filtering criteria (for example 00047 * ECLFFielIdAlbum or ECLFFieldIdArtist) 00048 * @param aFilterParameter Filtering parameter (for example 00049 * name of album or artist) 00050 * @return Pointer to the CCEPostFilter object 00051 */ 00052 static CCEPostFilter* NewL( const TCLFDefaultFieldId aFilterCriteria, 00053 const TDesC& aFilterParameter ); 00054 00055 /** 00056 * Creates and returns a new instance of this class. Pointer is 00057 * left to the CleanupStack. 00058 * @param aFilterCriteria Filtering criteria (for example 00059 * ECLFFielIdAlbum or ECLFFieldIdArtist) 00060 * @param aFilterParameter Filtering parameter (for example 00061 * name of album or artist) 00062 * @return Pointer to the CCEPostFilter object 00063 */ 00064 static CCEPostFilter* NewLC( const TCLFDefaultFieldId aFilterCriteria, 00065 const TDesC& aFilterParameter ); 00066 00067 /** 00068 * Destructor. 00069 */ 00070 virtual ~CCEPostFilter(); 00071 00072 private: // Constructors 00073 /** 00074 * C++ default constructor. 00075 * @param aFilterCriteria Filtering criteria 00076 */ 00077 CCEPostFilter( const TCLFDefaultFieldId aFilterCriteria ); 00078 00079 /** 00080 * Symbian 2nd phase constructor. 00081 */ 00082 void ConstructL( const TDesC& aFilterParameter ); 00083 00084 protected: // Functions from base classes 00085 00086 /** 00087 * From MCLFPostFilter. Method for filtering the source list. Will get 00088 * called when post filtering operation is executed by calling refresh 00089 * for the list model. 00090 * @since Series 60 3.0 00091 * @param aItemList Source item list 00092 * @param aFilteredItemList Filtered/destination item list 00093 */ 00094 void FilterItemsL( const TArray<MCLFItem*>& aItemList, 00095 RPointerArray<MCLFItem>& aFilteredItemList ); 00096 00097 private: // Data 00098 00099 // Parameter for filtering (owned) 00100 HBufC* iFilterParameter; 00101 00102 // Criteria for filtering 00103 TCLFDefaultFieldId iFilterCriteria; 00104 00105 }; 00106 00107 #endif // __CCEPOSTFILTER_H__ 00108 00109 // End of File
|
© Nokia 2009 |