phonebookui/Phonebook2/spbcontentprovider/src/spbcontentproviderprivate.cpp
branchRCL_3
changeset 35 4ae315f230bc
parent 0 e686773b3f54
child 64 c1e8ba0c2b16
--- a/phonebookui/Phonebook2/spbcontentprovider/src/spbcontentproviderprivate.cpp	Tue May 11 16:00:21 2010 +0300
+++ b/phonebookui/Phonebook2/spbcontentprovider/src/spbcontentproviderprivate.cpp	Tue May 25 12:26:45 2010 +0300
@@ -22,6 +22,8 @@
 #include "spbcontent.h"
 #include "spbcontactstorelistener.h"
 
+#include <MVPbkContactStore.h>
+
 // CONSTANTS 
 namespace{
 
@@ -166,4 +168,27 @@
         }
     }
 
+// ----------------------------------------------------------------------------
+// CSpbContentProviderPrivate::CleanContentL
+// ----------------------------------------------------------------------------
+//
+void CSpbContentProviderPrivate::CleanContentL( 
+       MVPbkContactStore& aStore )
+    {
+    TInt i=0;
+    while( i < iContentCache.Count() )
+       {
+       CSpbContent* content = iContentCache[i];
+       if ( &content->Link().ContactStore() == &aStore )
+           {
+           iContentCache.Remove( i );
+           delete content;
+           }
+       else
+           {
+           i++;
+           }
+        }
+    }
+
 // end of file