creator/engine/inc/creator_contactsetcache.h
branchRCL_3
changeset 20 fad26422216a
parent 19 b3cee849fa46
child 21 f8280f3bfeb7
equal deleted inserted replaced
19:b3cee849fa46 20:fad26422216a
     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     void AppendL(TUint32);
       
    35     TInt NumberOfExistingContacts() const;
       
    36     RArray<TUint32> ContactLinks();
       
    37     const RArray<TUint32> ContactLinks() const;
       
    38 
       
    39     TInt LinkId() const;
       
    40 
       
    41 private:
       
    42     CCreatorContactSet(TInt aLinkId, TInt aNumOfExistingContacts);    
       
    43     //void ConstructL();
       
    44     TInt iLinkId;
       
    45     TInt iNumOfExistingContacts;
       
    46     RArray<TUint32> iContactLinks;
       
    47 };
       
    48 
       
    49 class MContactLinkCache
       
    50 {
       
    51 public:
       
    52     virtual void AppendL(CCreatorContactSet* aContactSet) = 0;
       
    53     virtual RArray<TUint32> ContactLinks(TInt aLinkId) = 0;
       
    54     virtual const RArray<TUint32> ContactLinks(TInt aLinkId) const = 0;    
       
    55     virtual RPointerArray<CCreatorContactSet>& ContactSets() = 0;
       
    56     virtual const RPointerArray<CCreatorContactSet>& ContactSets() const = 0;
       
    57     virtual const CCreatorContactSet& ContactSet(TInt aLinkId) const = 0;
       
    58     virtual CCreatorContactSet& ContactSet(TInt aLinkId) = 0;
       
    59 };
       
    60 
       
    61 class ContactLinkCache
       
    62 {
       
    63 public:
       
    64     static void InitializeL();
       
    65     static void DestroyL();
       
    66     
       
    67     static MContactLinkCache* Instance();
       
    68     
       
    69 private:
       
    70     ContactLinkCache(){};
       
    71     static CContactLinkCacheImp* iImp;
       
    72 };
       
    73 
       
    74 #endif /*CREATORCONTACTSETCACHE_H_*/