creator/src/creator_contactsetcache.cpp
changeset 11 4df3a095718c
parent 0 d6fe6244b863
equal deleted inserted replaced
10:e6e3e87d58b4 11:4df3a095718c
    29 TInt CCreatorContactSet::LinkId() const
    29 TInt CCreatorContactSet::LinkId() const
    30     {
    30     {
    31     return iLinkId;
    31     return iLinkId;
    32     }
    32     }
    33 
    33 
    34 #if(!defined __SERIES60_30__ && !defined __SERIES60_31__)
    34 #if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && SYMBIAN_VERSION_SUPPORT < SYMBIAN_4)
    35 void CCreatorContactSet::AppendL(MVPbkContactLink* aContactLink)
    35 void CCreatorContactSet::AppendL(MVPbkContactLink* aContactLink)
    36     {
    36     {
    37     iContactLinks.AppendL(aContactLink);
    37     iContactLinks.AppendL(aContactLink);
    38     }
    38     }
    39 
    39 
    76 {
    76 {
    77 public:
    77 public:
    78     static CContactLinkCacheImp* NewL();
    78     static CContactLinkCacheImp* NewL();
    79     virtual ~CContactLinkCacheImp();
    79     virtual ~CContactLinkCacheImp();
    80     virtual void AppendL(CCreatorContactSet* aContactSet);
    80     virtual void AppendL(CCreatorContactSet* aContactSet);
    81 #if(!defined __SERIES60_30__ && !defined __SERIES60_31__)
    81 #if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && SYMBIAN_VERSION_SUPPORT < SYMBIAN_4)
    82     virtual RPointerArray<MVPbkContactLink>& ContactLinks(TInt aLinkId);
    82     virtual RPointerArray<MVPbkContactLink>& ContactLinks(TInt aLinkId);
    83     virtual const RPointerArray<MVPbkContactLink>& ContactLinks(TInt aLinkId) const;
    83     virtual const RPointerArray<MVPbkContactLink>& ContactLinks(TInt aLinkId) const;
    84 #endif        
    84 #endif        
    85     virtual RPointerArray<CCreatorContactSet>& ContactSets();
    85     virtual RPointerArray<CCreatorContactSet>& ContactSets();
    86     virtual const RPointerArray<CCreatorContactSet>& ContactSets() const;
    86     virtual const RPointerArray<CCreatorContactSet>& ContactSets() const;
    88     virtual CCreatorContactSet& ContactSet(TInt aLinkId);
    88     virtual CCreatorContactSet& ContactSet(TInt aLinkId);
    89     
    89     
    90 private:
    90 private:
    91     void ConstructL();
    91     void ConstructL();
    92     CContactLinkCacheImp();
    92     CContactLinkCacheImp();
    93 #if(!defined __SERIES60_30__ && !defined __SERIES60_31__)    
    93 #if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && SYMBIAN_VERSION_SUPPORT < SYMBIAN_4)    
    94     RPointerArray<MVPbkContactLink> iEmptyLinks;
    94     RPointerArray<MVPbkContactLink> iEmptyLinks;
    95 #endif    
    95 #endif    
    96     RPointerArray<CCreatorContactSet> iContactSets;
    96     RPointerArray<CCreatorContactSet> iContactSets;
    97     CCreatorContactSet* iDummyContactSet;
    97     CCreatorContactSet* iDummyContactSet;
    98 };
    98 };
   116 : iDummyContactSet(0)
   116 : iDummyContactSet(0)
   117     {}
   117     {}
   118 
   118 
   119 CContactLinkCacheImp::~CContactLinkCacheImp()
   119 CContactLinkCacheImp::~CContactLinkCacheImp()
   120     {
   120     {
   121 #if(!defined __SERIES60_30__ && !defined __SERIES60_31__)    
   121 #if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && SYMBIAN_VERSION_SUPPORT < SYMBIAN_4)    
   122     iEmptyLinks.ResetAndDestroy(); // just in case...
   122     iEmptyLinks.ResetAndDestroy(); // just in case...
   123     iEmptyLinks.Close();
   123     iEmptyLinks.Close();
   124 #endif
   124 #endif
   125     iContactSets.ResetAndDestroy();
   125     iContactSets.ResetAndDestroy();
   126     iContactSets.Close();
   126     iContactSets.Close();
   129 void CContactLinkCacheImp::AppendL(CCreatorContactSet* aContactSet)
   129 void CContactLinkCacheImp::AppendL(CCreatorContactSet* aContactSet)
   130     {
   130     {
   131     iContactSets.AppendL(aContactSet);
   131     iContactSets.AppendL(aContactSet);
   132     }
   132     }
   133 
   133 
   134 #if(!defined __SERIES60_30__ && !defined __SERIES60_31__)
   134 #if(!defined __SERIES60_30__ && !defined __SERIES60_31__ && SYMBIAN_VERSION_SUPPORT < SYMBIAN_4)
   135 
   135 
   136 RPointerArray<MVPbkContactLink>& CContactLinkCacheImp::ContactLinks(TInt aLinkId)
   136 RPointerArray<MVPbkContactLink>& CContactLinkCacheImp::ContactLinks(TInt aLinkId)
   137     {
   137     {
   138     for( TInt i = 0; i < iContactSets.Count(); ++i )
   138     for( TInt i = 0; i < iContactSets.Count(); ++i )
   139         {
   139         {