diff -r 4ae315f230bc -r a6539d1e8e43 predictivesearch/PcsAlgorithm/Algorithm1/inc/CPcsAdaptiveGrid.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/predictivesearch/PcsAlgorithm/Algorithm1/inc/CPcsAdaptiveGrid.h Wed Jun 09 09:26:27 2010 +0300 @@ -0,0 +1,108 @@ +/* +* Copyright (c) 2010 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: Utility class to hold a single item for Adaptive Grid. +* Used to provide quickly to client applications (Phonebook) +* The Adaptive Grid for the full list of contacts, which is +* the one that is displayed when the Find Box is empty. +*/ + +#ifndef __CPS_ADAPTIVE_GRID_H__ +#define __CPS_ADAPTIVE_GRID_H__ + +// SYSTEM INCLUDES +#include +#include +#include + +#include "CPcsAdaptiveGridItem.h" + +// CLASS DECLARATION + +/** + * Utility class to hold a single item for the Adaptive Grid. + * This class is used to represent one character of the Adaptive Grid + * with its reference counters. + * + * @lib pcsutils.lib + * @since S60 v3.2 + */ +class CPcsAdaptiveGrid : public CBase +{ + public: + + /** + * Two phase construction + * + * @return Instance of CPcsAdaptiveGrid + */ + static CPcsAdaptiveGrid* NewL( ); + + /** + * Destructor + */ + ~CPcsAdaptiveGrid(); + + /** + * Return the count of grid items + */ + TInt Count(); + + /** + * Return the index of the Adaptive Grid item, given the char + */ + TInt GetAdaptiveGridItemIndex( const TChar& aChar ); + + /** + * Get the pointer to the Adaptive Grid item, given the char + */ + CPcsAdaptiveGridItem* GetAdaptiveGridItemPtr( const TChar& aChar ); + + /** + * Increment the ref counter of the Adaptive Grid item, given the char + * and the selector + */ + void IncrementRefCounterL( const TChar& aChar, const TUint aSelector ); + + /** + * Decrement the ref counter of the Adaptive Grid item, given the char + * and the selector + */ + void DecrementRefCounter( const TChar& aChar, const TUint aSelector ); + + /** + * Return the Adaptive Grid, given the Company Name + */ + void GetAdaptiveGrid( const TBool aCompanyName, TDes& aGrid ); + + /** + * Print the Adaptive Grid + */ + void CPcsAdaptiveGrid::PrintAdatptiveGrid( ); + + private: + + /** + * Default Constructor + */ + CPcsAdaptiveGrid(); + + /** + * Array of Adaptive Grid characters with reference counters. + */ + RPointerArray iAdaptiveGrid; +}; + +#endif // __CPS_ADAPTIVE_GRID_H__ + +// End of file