diff -r 000000000000 -r c53acadfccc6 clfwrapper/ClientSrc/CCLFDefaultOperation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/clfwrapper/ClientSrc/CCLFDefaultOperation.h Mon Jan 18 20:34:07 2010 +0200 @@ -0,0 +1,130 @@ +/* +* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#ifndef CCLFDEFAULTOPERATION_H +#define CCLFDEFAULTOPERATION_H + +// INCLUDES +#include +#include +#include +#include +#include +#include + +// FORWARD DECLARATIONS +class MCLFSortingStyle; +class MCLFModifiableItem; + +// CLASS DECLARATION + +/** +* This class implements operations from +* MCLFCustomSorter, MCLFPostFilter and MCLFCustomGrouper. +* +* @lib ContentListingFramework.lib +* @since Series 60 3.0 +*/ +NONSHARABLE_CLASS( CCLFDefaultOperation ) : public CBase, + public MCLFCustomSorter, + public MCLFPostFilter, + public MCLFCustomGrouper + { + + public: // Constructors and destructor + + /** + * Two-phased constructor. + */ + static CCLFDefaultOperation* NewL(); + + /** + * Destructor. + */ + virtual ~CCLFDefaultOperation(); + + public: // New functions + + /** + * Set sorting style. + * @since Series 60 3.0 + * @param aSortingStyle Ownership is not transfered + */ + void SetSortingStyle( MCLFSortingStyle* aSortingStyle ); + + /** + * Append sorting style. + * @since Series 60 3.0 + * @param aSortingStyle Ownership is not transfered + */ + void AppendSortingStyleL( MCLFSortingStyle& aSortingStyle ); + + /** + * Set item grouping. + * @since Series 60 3.0 + * @param aGrouping Grouping style + */ + void SetGrouping( TCLFGrouping aGrouping ); + + protected: // New functions + + void DoMusicAlbumGroupingL( const TArray& aSourceList, + RPointerArray& aGroupedList ); + + protected: // Functions from base classes + + /** + * From MCLFCustomSorter + */ + virtual void SortItemsL( RPointerArray& aItemArray ); + + /** + * From MCLFCustomGrouper + */ + virtual void GroupItemsL( const TArray& aSourceList, + RPointerArray& aGroupedList ); + + /** + * From MCLFPostFilter + */ + virtual void FilterItemsL( const TArray& aItemList, + RPointerArray& aFilteredItemList ); + + private: + + /** + * C++ default constructor. + */ + CCLFDefaultOperation(); + + private: // Data + // Ref. + MCLFSortingStyle* iSortingStyle; + // Ref. + RPointerArray iSortingStyleArray; + // Grouping style + TCLFGrouping iGrouping; + // Own. this class owns grouped items + RPointerArray iGroupedItemList; + + }; + +#endif // CCLFDEFAULTOPERATION_H + +// End of File