CPbkContactEngine::CContactDbConnection Class Reference

class CPbkContactEngine::CContactDbConnection : public CBase

Helper class for holding the contact database connection related objects of CPbkContactEngine.

Inherits from

  • CPbkContactEngine::CContactDbConnection
Public Member Functions
~CContactDbConnection()
CContactViewBase &AllContactsView()
CContactViewBase &AllGroupsViewL()
voidCancelCompress()
voidChangeSortOrderL(const RContactViewSortOrder &)
TBool CheckCompress()
voidCheckFileSystemSpaceAndCompressL()
voidCompressL()
MPbkContactNameFormat &ContactNameFormatter()
CContactDatabase &Database()
TBool FileSpaceLowOnDbDrive()
CContactViewBase &FilteredContactsViewL(TInt)
TBool IsCompressionEnabled()
CPbkContactEngine::TPbkNameOrder NameDisplayOrder()
TChar NameSeparator()
CContactDbConnection *NewL(const TParams &, TBool)
voidSetCompressUi(MPbkCompressUi *)
voidSetNameDisplayOrderL(TPbkNameOrder)
voidSetNameSeparatorL(TChar)
const CPbkSortOrderManager &SortOrderManager()
Private Member Functions
CContactDbConnection()
TBool CheckSystemTemplateL(const CPbkFieldsInfo &)
voidCloseSystemTemplate()
voidConstructL(const TParams &, TBool)
voidCreateAllContactsViewL(const RContactViewSortOrder &)
voidHandleContactViewEvent(const CContactViewBase &, const TContactViewEvent &)
voidInitViewL(CContactViewBase &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CContactNamedRemoteView *iAllContactsView
MPbkCompressionStrategy *iCompressionStrategy
CContactChangeNotifier *iContactChangeNotifier
CContactDatabase *iContactDb
MPbkContactNameFormat *iContactNameFormatter
TDriveNumber iDbDrive
RArray< TFilteredView >iFilteredViews
RFs iFs
CContactLocalView *iGroupsLocalView
CPbkSortOrderManager *iSortOrderManager
CContactItem *iSysTemplate

Constructor & Destructor Documentation

CContactDbConnection()

CContactDbConnection()[private, inline]

~CContactDbConnection()

~CContactDbConnection()

Destructor.

Member Functions Documentation

AllContactsView()

CContactViewBase &AllContactsView()const [inline]

Returns the all contacts view.

AllGroupsViewL()

CContactViewBase &AllGroupsViewL()

Returns the all groups view.

CancelCompress()

voidCancelCompress()const

Cancels compression started in CompressL().

ChangeSortOrderL(const RContactViewSortOrder &)

voidChangeSortOrderL(const RContactViewSortOrder &aSortOrder)const

Changes the sort order. Contact views will be resorted which puts them into not ready state for a while.

Parameters

const RContactViewSortOrder & aSortOrderNew sort order

CheckCompress()

TBool CheckCompress()

Returns ETrue if the database could use a compression.

CheckFileSystemSpaceAndCompressL()

voidCheckFileSystemSpaceAndCompressL()

Compacts the database synchronously if it recommends compression. If file system space is under critical level after compaction, leaves with KErrDiskFull.

CheckSystemTemplateL(const CPbkFieldsInfo &)

TBool CheckSystemTemplateL(const CPbkFieldsInfo &aFieldsInfo)[private, inline]

Parameters

const CPbkFieldsInfo & aFieldsInfo

CloseSystemTemplate()

voidCloseSystemTemplate()[private]

CompressL()

voidCompressL()

Compresses the database asynchronously. Compress UI must be set and give its permission to start compression. Calls back the compress UI on the compression progress.

ConstructL(const TParams &, TBool)

voidConstructL(const TParams &aParams,
TBoolaSettingsVisible
)[private, inline]

Parameters

const TParams & aParams
TBool aSettingsVisible

ContactNameFormatter()

MPbkContactNameFormat &ContactNameFormatter()const

Returns the name formatting object.

CreateAllContactsViewL(const RContactViewSortOrder &)

voidCreateAllContactsViewL(const RContactViewSortOrder &aSortOrder)[private, inline]

Parameters

const RContactViewSortOrder & aSortOrder

Database()

CContactDatabase &Database()const [inline]

Returns the contact database.

FileSpaceLowOnDbDrive()

TBool FileSpaceLowOnDbDrive()const

Returns true if file system space is low on the drive where contact database is located.

FilteredContactsViewL(TInt)

CContactViewBase &FilteredContactsViewL(TIntaFilter)

Returns a contact view filtered by aFilter.

Parameters

TInt aFiltersee CContactDatabase::TContactViewFilter.

HandleContactViewEvent(const CContactViewBase &, const TContactViewEvent &)

voidHandleContactViewEvent(const CContactViewBase &aView,
const TContactViewEvent &aEvent
)[private]

Parameters

const CContactViewBase & aView
const TContactViewEvent & aEvent

InitViewL(CContactViewBase &)

voidInitViewL(CContactViewBase &aView)[private]

Call this method for all views created in this class.

Parameters

CContactViewBase & aView

IsCompressionEnabled()

TBool IsCompressionEnabled()const

Returns ETrue if background database compression is currently enabled.

NameDisplayOrder()

CPbkContactEngine::TPbkNameOrder NameDisplayOrder()

Returns the current name displaying order.

NameSeparator()

TChar NameSeparator()

Returns the separator char to be used between last- and first names. If value = 0, then separator should not be used between names.

NewL(const TParams &, TBool)

CContactDbConnection *NewL(const TParams &aParams,
TBoolaSettingsVisible
)[static]

Creates a new instance of this class.

Parameters

const TParams & aParamssee CContactDbConnection::TParams.
TBool aSettingsVisibleLocalization defined value, is the settings menu item visible or not. Affects to the name sorting.

SetCompressUi(MPbkCompressUi *)

voidSetCompressUi(MPbkCompressUi *aCompressUi)

Sets the compress UI.

Parameters

MPbkCompressUi * aCompressUi

SetNameDisplayOrderL(TPbkNameOrder)

voidSetNameDisplayOrderL(TPbkNameOrderaNameOrder)

Sets aNameOrder as the contact name ordering setting.

Parameters

TPbkNameOrder aNameOrder

SetNameSeparatorL(TChar)

voidSetNameSeparatorL(TCharaNameSeparator)

Sets the separator char to be used between last- and first names. If value of aSeparator= 0, then separator should not be used..

Parameters

TChar aNameSeparator

SortOrderManager()

const CPbkSortOrderManager &SortOrderManager()const [inline]

Returns the sort order manager.

Member Data Documentation

CContactNamedRemoteView * iAllContactsView

CContactNamedRemoteView *iAllContactsView[private]

MPbkCompressionStrategy * iCompressionStrategy

MPbkCompressionStrategy *iCompressionStrategy[private]

CContactChangeNotifier * iContactChangeNotifier

CContactChangeNotifier *iContactChangeNotifier[private]

CContactDatabase * iContactDb

CContactDatabase *iContactDb[private]

MPbkContactNameFormat * iContactNameFormatter

MPbkContactNameFormat *iContactNameFormatter[private]

TDriveNumber iDbDrive

TDriveNumber iDbDrive[private]

RArray< TFilteredView > iFilteredViews

RArray< TFilteredView >iFilteredViews[private]

RFs iFs

RFs iFs[private]

CContactLocalView * iGroupsLocalView

CContactLocalView *iGroupsLocalView[private]

CPbkSortOrderManager * iSortOrderManager

CPbkSortOrderManager *iSortOrderManager[private]

CContactItem * iSysTemplate

CContactItem *iSysTemplate[private]