creator/engine/inc/creator_contactsetcache.h
changeset 17 4f2773374eff
child 19 4b22a598b890
equal deleted inserted replaced
15:e11368ed4880 17:4f2773374eff
       
     1 /*
       
     2 * Copyright (c) 2010 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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CREATORCONTACTSETCACHE_H_
       
    22 #define CREATORCONTACTSETCACHE_H_
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 // Forward declarations
       
    27 class CContactLinkCacheImp;
       
    28 
       
    29 class CCreatorContactSet : public CBase
       
    30 {
       
    31 public:
       
    32     static CCreatorContactSet* NewL(TInt aLinkId, TInt aNumOfExistingContacts);
       
    33     virtual ~CCreatorContactSet();
       
    34     TInt LinkId() const;
       
    35 
       
    36 private:
       
    37     CCreatorContactSet(TInt aLinkId, TInt aNumOfExistingContacts);    
       
    38     //void ConstructL();
       
    39     TInt iLinkId;
       
    40     TInt iNumOfExistingContacts;
       
    41 };
       
    42 
       
    43 class MContactLinkCache
       
    44 {
       
    45 public:
       
    46     virtual void AppendL(CCreatorContactSet* aContactSet) = 0;
       
    47     virtual RPointerArray<CCreatorContactSet>& ContactSets() = 0;
       
    48     virtual const RPointerArray<CCreatorContactSet>& ContactSets() const = 0;
       
    49     virtual const CCreatorContactSet& ContactSet(TInt aLinkId) const = 0;
       
    50     virtual CCreatorContactSet& ContactSet(TInt aLinkId) = 0;
       
    51 };
       
    52 
       
    53 class ContactLinkCache
       
    54 {
       
    55 public:
       
    56     static void InitializeL();
       
    57     static void DestroyL();
       
    58     
       
    59     static MContactLinkCache* Instance();
       
    60     
       
    61 private:
       
    62     ContactLinkCache(){};
       
    63     static CContactLinkCacheImp* iImp;
       
    64 };
       
    65 
       
    66 #endif /*CREATORCONTACTSETCACHE_H_*/