20 |
20 |
21 #ifndef CREATORCONTACTSETCACHE_H_ |
21 #ifndef CREATORCONTACTSETCACHE_H_ |
22 #define CREATORCONTACTSETCACHE_H_ |
22 #define CREATORCONTACTSETCACHE_H_ |
23 |
23 |
24 #include <e32base.h> |
24 #include <e32base.h> |
|
25 #include <qtcontacts.h> |
25 |
26 |
26 // Forward declarations |
27 // Forward declarations |
27 class CContactLinkCacheImp; |
28 class CContactLinkCacheImp; |
28 |
29 |
|
30 QTM_USE_NAMESPACE |
29 class CCreatorContactSet : public CBase |
31 class CCreatorContactSet : public CBase |
30 { |
32 { |
31 public: |
33 public: |
32 static CCreatorContactSet* NewL(TInt aLinkId, TInt aNumOfExistingContacts); |
34 static CCreatorContactSet* NewL(TInt aLinkId, TInt aNumOfExistingContacts); |
33 virtual ~CCreatorContactSet(); |
35 virtual ~CCreatorContactSet(); |
|
36 void AppendL(QContactLocalId); |
|
37 TInt NumberOfExistingContacts() const; |
|
38 RArray<QContactLocalId> ContactLinks(); |
|
39 const RArray<QContactLocalId> ContactLinks() const; |
|
40 |
34 TInt LinkId() const; |
41 TInt LinkId() const; |
35 |
42 |
36 private: |
43 private: |
37 CCreatorContactSet(TInt aLinkId, TInt aNumOfExistingContacts); |
44 CCreatorContactSet(TInt aLinkId, TInt aNumOfExistingContacts); |
38 //void ConstructL(); |
45 //void ConstructL(); |
39 TInt iLinkId; |
46 TInt iLinkId; |
40 TInt iNumOfExistingContacts; |
47 TInt iNumOfExistingContacts; |
|
48 RArray<QContactLocalId> iContactLinks; |
41 }; |
49 }; |
42 |
50 |
43 class MContactLinkCache |
51 class MContactLinkCache |
44 { |
52 { |
45 public: |
53 public: |
46 virtual void AppendL(CCreatorContactSet* aContactSet) = 0; |
54 virtual void AppendL(CCreatorContactSet* aContactSet) = 0; |
|
55 virtual RArray<QContactLocalId> ContactLinks(TInt aLinkId) = 0; |
|
56 virtual const RArray<QContactLocalId> ContactLinks(TInt aLinkId) const = 0; |
47 virtual RPointerArray<CCreatorContactSet>& ContactSets() = 0; |
57 virtual RPointerArray<CCreatorContactSet>& ContactSets() = 0; |
48 virtual const RPointerArray<CCreatorContactSet>& ContactSets() const = 0; |
58 virtual const RPointerArray<CCreatorContactSet>& ContactSets() const = 0; |
49 virtual const CCreatorContactSet& ContactSet(TInt aLinkId) const = 0; |
59 virtual const CCreatorContactSet& ContactSet(TInt aLinkId) const = 0; |
50 virtual CCreatorContactSet& ContactSet(TInt aLinkId) = 0; |
60 virtual CCreatorContactSet& ContactSet(TInt aLinkId) = 0; |
51 }; |
61 }; |