phonebookengines/VirtualPhonebook/VPbkEng/inc/CVPbkTopContactManagerImpl.h
branchRCL_3
changeset 13 a6539d1e8e43
parent 0 e686773b3f54
--- a/phonebookengines/VirtualPhonebook/VPbkEng/inc/CVPbkTopContactManagerImpl.h	Tue May 25 12:26:45 2010 +0300
+++ b/phonebookengines/VirtualPhonebook/VPbkEng/inc/CVPbkTopContactManagerImpl.h	Wed Jun 09 09:26:27 2010 +0300
@@ -53,6 +53,23 @@
     	 */
         static CVPbkTopContactManagerImpl* NewL(
                 CVPbkContactManager& aContactManager );
+        
+        /**
+         * Creates the top contact manager passing an already constructed top
+         * contacts view as a parameter. This greatly improves performance of adding 
+         * new favorites as the top contact view contsrution can be a heavy operation.
+         * 
+         * Note, passing the view doesn't affect the view and links fetching 
+         * (e.g. GetTopContactsViewL, GetTopContactLinksL, etc.)
+         * 
+         * @param aContactManager Contact manager which already has its stores opened.
+         * @param aTopView top contact view which already has been constructed.
+         * 
+         * @return Top contact manager instance
+         */
+        static CVPbkTopContactManagerImpl* NewL(
+               CVPbkContactManager& aContactManager,
+               MVPbkContactViewBase& aTopView);
 
         /**
          * Creates the top contact manager impl.
@@ -138,6 +155,9 @@
         // or reference to own contact manager iOurContactManager
         CVPbkContactManager* iContactManager; // not owned
         CVPbkContactManager* iOurContactManager; // owned
+        
+        // Reference to a clients top contact view 
+        MVPbkContactViewBase* iTopView; // not owned
     };
 
 #endif //VPBKTOPCONTACTMANAGERIMPL_H