118 // Get list of pool elements specific to a pool |
118 // Get list of pool elements specific to a pool |
119 // ---------------------------------------------------------------------------- |
119 // ---------------------------------------------------------------------------- |
120 void CPcsCache::GetContactsForKeyL(TInt aKeyId, RPointerArray<CPcsPoolElement>& aData) |
120 void CPcsCache::GetContactsForKeyL(TInt aKeyId, RPointerArray<CPcsPoolElement>& aData) |
121 { |
121 { |
122 PRINT ( _L("Enter CPcsCache::GetContactsForKeyL") ); |
122 PRINT ( _L("Enter CPcsCache::GetContactsForKeyL") ); |
123 |
123 CleanupClosePushL( aData ); |
124 if ( aKeyId >= 0 && aKeyId < iKeyArr.Count() ) |
124 if ( aKeyId >= 0 && aKeyId < iKeyArr.Count() ) |
125 { |
125 { |
126 const RPointerArray<CPcsPoolElement>& arr = *iKeyArr[aKeyId]; |
126 const RPointerArray<CPcsPoolElement>& arr = *iKeyArr[aKeyId]; |
127 for ( TInt i = 0; i < arr.Count(); i++ ) |
127 for ( TInt i = 0; i < arr.Count(); i++ ) |
128 { |
128 { |
129 aData.AppendL(arr[i]); |
129 aData.AppendL(arr[i]); |
130 } |
130 } |
131 } |
131 } |
132 |
132 CleanupStack::Pop(); |
133 PRINT ( _L("End CPcsCache::GetContactsForKeyL") ); |
133 PRINT ( _L("End CPcsCache::GetContactsForKeyL") ); |
134 } |
134 } |
135 |
135 |
136 // ---------------------------------------------------------------------------- |
136 // ---------------------------------------------------------------------------- |
137 // CPcsCache::GetAllContentsL |
137 // CPcsCache::GetAllContentsL |
138 // Get all data elements in this cache |
138 // Get all data elements in this cache |
139 // ---------------------------------------------------------------------------- |
139 // ---------------------------------------------------------------------------- |
140 void CPcsCache::GetAllContentsL(RPointerArray<CPsData>& aData) |
140 void CPcsCache::GetAllContentsL(RPointerArray<CPsData>& aData) |
141 { |
141 { |
142 PRINT ( _L("Enter CPcsCache::GetAllContentsL") ); |
142 PRINT ( _L("Enter CPcsCache::GetAllContentsL") ); |
143 |
143 CleanupClosePushL( aData ); |
144 for ( TInt i = 0; i < iMasterPool.Count(); i++ ) |
144 for ( TInt i = 0; i < iMasterPool.Count(); i++ ) |
145 { |
145 { |
146 aData.AppendL(iMasterPool[i]); |
146 aData.AppendL(iMasterPool[i]); |
147 } |
147 } |
148 |
148 CleanupStack::Pop(); |
149 PRINT ( _L("End CPcsCache::GetAllContentsL") ); |
149 PRINT ( _L("End CPcsCache::GetAllContentsL") ); |
150 } |
150 } |
151 |
151 |
152 // ---------------------------------------------------------------------------- |
152 // ---------------------------------------------------------------------------- |
153 // CPcsCache::AddToPool |
153 // CPcsCache::AddToPool |