phonebookui/Phonebook2/inc/pbk2contactuicontroldoublelistboxextension.h
changeset 0 e686773b3f54
child 32 2828b4d142c0
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Phonebook 2 UI control UI extension interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MPBK2CONTACTUICONTROLDOUBLELISTBOXEXTENSION_H
       
    20 #define MPBK2CONTACTUICONTROLDOUBLELISTBOXEXTENSION_H
       
    21 
       
    22 //  FORWARD DECLARATIONS
       
    23 class MVPbkStoreContact;
       
    24 class MVPbkViewContact;
       
    25 class MPbk2CommandItemUpdater;
       
    26 class TPbk2IconId;
       
    27 
       
    28 class MPbk2DoubleListboxDataElement
       
    29     {
       
    30 public:
       
    31     enum TIconDataElementItems
       
    32         {
       
    33         EThumbnail      = 0x0,
       
    34         EMainIcon,
       
    35         EServiceIcon
       
    36         };
       
    37     enum TTextDataElementItems
       
    38         {
       
    39         EName           = 0x0,
       
    40         EStatusText
       
    41         };
       
    42     
       
    43     /**
       
    44      * Type of the text element.
       
    45      */
       
    46     enum TTextDataType
       
    47         {
       
    48         // Text's type not set or unknown
       
    49         ETypeNone           = 0x0,
       
    50         // Text's type is generic text
       
    51         ETypeGenericText,
       
    52         // Text's type is phone number
       
    53         ETypePhoneNumber
       
    54         };    
       
    55     
       
    56     virtual const TPbk2IconId& IconId( 
       
    57             MPbk2DoubleListboxDataElement::TIconDataElementItems aIndex ) const =0;
       
    58     virtual const TDesC& Text( 
       
    59             MPbk2DoubleListboxDataElement::TTextDataElementItems aIndex ) const =0;
       
    60     virtual TTextDataType TextType( 
       
    61             MPbk2DoubleListboxDataElement::TTextDataElementItems aIndex ) const =0;
       
    62 
       
    63     virtual void SetIconId( 
       
    64             MPbk2DoubleListboxDataElement::TIconDataElementItems aIndex, 
       
    65             const TPbk2IconId& aIconId ) =0;
       
    66     virtual void SetText( 
       
    67             MPbk2DoubleListboxDataElement::TTextDataElementItems aIndex, 
       
    68             HBufC* aBuffer,
       
    69             MPbk2DoubleListboxDataElement::TTextDataType aType ) =0;
       
    70     
       
    71 protected:
       
    72     ~MPbk2DoubleListboxDataElement() {};
       
    73     };
       
    74 
       
    75 
       
    76 // CLASS DECLARATION
       
    77 /**
       
    78  * This class is an extension to MPbk2ContactUiControlExtension.
       
    79  * See documentation of MPbk2ContactUiControlExtension from header
       
    80  * MPbk2ContactUiControlExtension.h 
       
    81  * 
       
    82  * You can access this extension by calling
       
    83  * MPbk2ContactUiControlExtension->ContactUiControlExtensionExtension()
       
    84  */
       
    85 class MPbk2ContactUiControlDoubleListboxExtension
       
    86     {
       
    87     public: // Interface
       
    88 
       
    89         /**
       
    90          * 
       
    91          */
       
    92         virtual void FormatDataL(
       
    93                 const MVPbkViewContact& aViewContact, 
       
    94                 MPbk2DoubleListboxDataElement& aDataElement ) =0;
       
    95         
       
    96         /**
       
    97          * Sets Command item updater for this extension.
       
    98          *
       
    99          * @param aCommandUpdator   UI control command updater.
       
   100          *                          If NULL, association  is removed.
       
   101          */
       
   102         virtual void SetCommandItemUpdater(
       
   103             MPbk2CommandItemUpdater* aCommandUpdater ) = 0;
       
   104 
       
   105     protected:
       
   106         /**
       
   107          * Destructor.
       
   108          */
       
   109         virtual ~MPbk2ContactUiControlDoubleListboxExtension(){}
       
   110     };
       
   111 
       
   112 #endif // MPBK2CONTACTUICONTROLDOUBLELISTBOXEXTENSION_H
       
   113 
       
   114 // End of File