contacts_plat/phonebook_2_ui_controls_api/inc/CPbk2ContactIconsUtils.h
branchRCL_3
changeset 63 f4a778e096c2
child 64 c1e8ba0c2b16
equal deleted inserted replaced
62:5b6f26637ad3 63:f4a778e096c2
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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 icon utils.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPBK2ICONSUTILS_H
       
    20 #define CPBK2ICONSUTILS_H
       
    21 
       
    22 // INCLUDE FILES
       
    23 #include <e32base.h>
       
    24 #include <TPbk2IconId.h>
       
    25 // FORWARD DECLARATIONS
       
    26 class CPbk2StorePropertyArray;
       
    27 class MPbk2ContactUiControlExtension;
       
    28 class MVPbkViewContact;
       
    29 class CPbk2IconArray;
       
    30 
       
    31 /**
       
    32  * Phonebook 2 utils to retrieve icons attributed to a contact.
       
    33  */
       
    34 class CPbk2ContactIconsUtils : public CBase
       
    35     {
       
    36     public: // Construction and destruction
       
    37 
       
    38         /**
       
    39          * Creates a new instance of this class.
       
    40          *
       
    41          * @param aStoreProperties  Store properties
       
    42          * @param aUiExtension      UI contact control extension
       
    43          * 
       
    44          * @return  A new instance of this class.
       
    45          */
       
    46         IMPORT_C static CPbk2ContactIconsUtils* NewL(
       
    47                 CPbk2StorePropertyArray& aStoreProperties,
       
    48                 MPbk2ContactUiControlExtension* aUiExtension );
       
    49 
       
    50         /**
       
    51          * Destructor.
       
    52          */
       
    53         ~CPbk2ContactIconsUtils();
       
    54 
       
    55     public: // Interface
       
    56         /**
       
    57          * Return icons attributed to a contact based on
       
    58          * store properties and ui control extension plug-ins. 
       
    59          *
       
    60          * @param aViewContact  the view contact to find icons for.
       
    61          * @param aIconArray  result icon array with contact's icons
       
    62          */
       
    63         IMPORT_C void GetIconIdsForContactL(
       
    64                 const MVPbkViewContact& aViewContact,
       
    65                 RArray<TPbk2IconId>& aIconArray ) const;
       
    66 
       
    67         /**
       
    68          * Creates an icon array based on the resource id and appends to  it 
       
    69          * icons from UI extension plug-ins.
       
    70          *
       
    71          * @param aResourceId PBK2_ICON_ARRAY type resource id
       
    72          */        
       
    73         IMPORT_C static CPbk2IconArray* CreateListboxIconArrayL(TInt aResourceId);
       
    74         
       
    75     private:
       
    76         CPbk2ContactIconsUtils::CPbk2ContactIconsUtils(
       
    77                 CPbk2StorePropertyArray& aStoreProperties,
       
    78                 MPbk2ContactUiControlExtension* aUiExtension );        
       
    79 
       
    80     private: // Data
       
    81         /// Ref: Store UI properties
       
    82         CPbk2StorePropertyArray& iStoreProperties;
       
    83         /// Ref: Ui extension point
       
    84         MPbk2ContactUiControlExtension* iUiExtension;
       
    85     };
       
    86 
       
    87 #endif // CPBK2ICONSUTILS_H
       
    88 
       
    89 // End of File