diff -r 000000000000 -r e686773b3f54 phonebookui/Phonebook2/inc/pbk2contactuicontroldoublelistboxextension.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phonebookui/Phonebook2/inc/pbk2contactuicontroldoublelistboxextension.h Tue Feb 02 10:12:17 2010 +0200 @@ -0,0 +1,114 @@ +/* +* Copyright (c) 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: Phonebook 2 UI control UI extension interface. +* +*/ + + +#ifndef MPBK2CONTACTUICONTROLDOUBLELISTBOXEXTENSION_H +#define MPBK2CONTACTUICONTROLDOUBLELISTBOXEXTENSION_H + +// FORWARD DECLARATIONS +class MVPbkStoreContact; +class MVPbkViewContact; +class MPbk2CommandItemUpdater; +class TPbk2IconId; + +class MPbk2DoubleListboxDataElement + { +public: + enum TIconDataElementItems + { + EThumbnail = 0x0, + EMainIcon, + EServiceIcon + }; + enum TTextDataElementItems + { + EName = 0x0, + EStatusText + }; + + /** + * Type of the text element. + */ + enum TTextDataType + { + // Text's type not set or unknown + ETypeNone = 0x0, + // Text's type is generic text + ETypeGenericText, + // Text's type is phone number + ETypePhoneNumber + }; + + virtual const TPbk2IconId& IconId( + MPbk2DoubleListboxDataElement::TIconDataElementItems aIndex ) const =0; + virtual const TDesC& Text( + MPbk2DoubleListboxDataElement::TTextDataElementItems aIndex ) const =0; + virtual TTextDataType TextType( + MPbk2DoubleListboxDataElement::TTextDataElementItems aIndex ) const =0; + + virtual void SetIconId( + MPbk2DoubleListboxDataElement::TIconDataElementItems aIndex, + const TPbk2IconId& aIconId ) =0; + virtual void SetText( + MPbk2DoubleListboxDataElement::TTextDataElementItems aIndex, + HBufC* aBuffer, + MPbk2DoubleListboxDataElement::TTextDataType aType ) =0; + +protected: + ~MPbk2DoubleListboxDataElement() {}; + }; + + +// CLASS DECLARATION +/** + * This class is an extension to MPbk2ContactUiControlExtension. + * See documentation of MPbk2ContactUiControlExtension from header + * MPbk2ContactUiControlExtension.h + * + * You can access this extension by calling + * MPbk2ContactUiControlExtension->ContactUiControlExtensionExtension() + */ +class MPbk2ContactUiControlDoubleListboxExtension + { + public: // Interface + + /** + * + */ + virtual void FormatDataL( + const MVPbkViewContact& aViewContact, + MPbk2DoubleListboxDataElement& aDataElement ) =0; + + /** + * Sets Command item updater for this extension. + * + * @param aCommandUpdator UI control command updater. + * If NULL, association is removed. + */ + virtual void SetCommandItemUpdater( + MPbk2CommandItemUpdater* aCommandUpdater ) = 0; + + protected: + /** + * Destructor. + */ + virtual ~MPbk2ContactUiControlDoubleListboxExtension(){} + }; + +#endif // MPBK2CONTACTUICONTROLDOUBLELISTBOXEXTENSION_H + +// End of File