/** CContactLocalView contructor, used in the server @internalTechnology */ EXPORT_C CContactLocalView* CContactLocalView::NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes, MLplPersistenceLayerFactory* aFactory, const TDesC8& aSortPluginName) { CContactLocalView* self = new (ELeave) CContactLocalView(aDb, aContactTypes, aFactory); CleanupStack::PushL(self); self->ConstructL(aObserver, aSortOrder, ETrue, aSortPluginName); CleanupStack::Pop(self); return self; }
/** Allocates and constructs the local view object. The view is sorted according to the sort order and view preferences specified, using a low priority idle time active object. The specified view observer is notified when the view is sorted and ready for use. @param aObserver An observer that receives notifications when this view is ready for use and when changes take place in it. The observer receives a TContactViewEvent::EReady event when the view is ready. Any attempt to use the view before this notification will Leave with KErrNotReady @param aDb The underlying database that contains the contact items. The view observes the database, so that it handles change events sent from the database. @param aSortOrder Specifies the fields to use to sort the items in the view. @param aContactTypes Specifies which types of contact items should be included in the view and the behaviour for items that do not have content in any of the fields specified in the sort order. @param aSortPluginName Specifies a plug-in that will be used to compare view contacts when the the view is sorted. This name is used by ECOM to select the plugin, and is matched with the "default_data" of all ECOM plugins that support the required interface. @return The newly constructed local view object. */ EXPORT_C CContactLocalView* CContactLocalView::NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb, const RContactViewSortOrder& aSortOrder, TContactViewPreferences aContactTypes, const TDesC8& aSortPluginName) { #ifdef CONTACTS_API_PROFILING TContactsApiProfile::CntViewMethodLog(TContactsApiProfile::ECntVwClassLocalView, TContactsApiProfile::ECntViewApiNewL, aSortOrder, aContactTypes, aSortPluginName); #endif CContactLocalView* self = new(ELeave) CContactLocalView(aDb, aContactTypes); CleanupStack::PushL(self); self->ConstructL(aObserver, aSortOrder, ETrue, aSortPluginName); CleanupStack::Pop(self); return self; }