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 ()
void CancelCompress ()
void ChangeSortOrderL (const RContactViewSortOrder &)
TBool CheckCompress ()
void CheckFileSystemSpaceAndCompressL ()
void CompressL ()
MPbkContactNameFormat & ContactNameFormatter ()
CContactDatabase & Database ()
TBool FileSpaceLowOnDbDrive ()
CContactViewBase & FilteredContactsViewL ( TInt )
TBool IsCompressionEnabled ()
CPbkContactEngine::TPbkNameOrder NameDisplayOrder ()
TChar NameSeparator ()
CContactDbConnection * NewL (const TParams &, TBool )
void SetCompressUi ( MPbkCompressUi *)
void SetNameDisplayOrderL ( TPbkNameOrder )
void SetNameSeparatorL ( TChar )
const CPbkSortOrderManager & SortOrderManager ()
Private Member Functions
CContactDbConnection ()
TBool CheckSystemTemplateL (const CPbkFieldsInfo &)
void CloseSystemTemplate ()
void ConstructL (const TParams &, TBool )
void CreateAllContactsViewL (const RContactViewSortOrder &)
void HandleContactViewEvent (const CContactViewBase &, const TContactViewEvent &)
void InitViewL ( 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()

void CancelCompress ( ) const

Cancels compression started in CompressL() .

ChangeSortOrderL(const RContactViewSortOrder &)

void ChangeSortOrderL ( 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 & aSortOrder New sort order

CheckCompress()

TBool CheckCompress ( )

Returns ETrue if the database could use a compression.

CheckFileSystemSpaceAndCompressL()

void CheckFileSystemSpaceAndCompressL ( )

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()

void CloseSystemTemplate ( ) [private]

CompressL()

void CompressL ( )

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)

void ConstructL ( const TParams & aParams,
TBool aSettingsVisible
) [private, inline]

Parameters

const TParams & aParams
TBool aSettingsVisible

ContactNameFormatter()

MPbkContactNameFormat & ContactNameFormatter ( ) const

Returns the name formatting object.

CreateAllContactsViewL(const RContactViewSortOrder &)

void CreateAllContactsViewL ( 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 ( TInt aFilter )

Returns a contact view filtered by aFilter.

Parameters

TInt aFilter see CContactDatabase::TContactViewFilter.

HandleContactViewEvent(const CContactViewBase &, const TContactViewEvent &)

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

Parameters

const CContactViewBase & aView
const TContactViewEvent & aEvent

InitViewL(CContactViewBase &)

void InitViewL ( 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,
TBool aSettingsVisible
) [static]

Creates a new instance of this class.

Parameters

const TParams & aParams see CContactDbConnection::TParams.
TBool aSettingsVisible Localization defined value, is the settings menu item visible or not. Affects to the name sorting.

SetCompressUi(MPbkCompressUi *)

void SetCompressUi ( MPbkCompressUi * aCompressUi )

Sets the compress UI.

Parameters

MPbkCompressUi * aCompressUi

SetNameDisplayOrderL(TPbkNameOrder)

void SetNameDisplayOrderL ( TPbkNameOrder aNameOrder )

Sets aNameOrder as the contact name ordering setting.

Parameters

TPbkNameOrder aNameOrder

SetNameSeparatorL(TChar)

void SetNameSeparatorL ( TChar aNameSeparator )

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]