CCommsDatabaseBase Class Reference

class CCommsDatabaseBase : public CBase

Base class for CCommsDatabase.

This class is never instantiated, but its member functions are used through the derived class.

Responsible for Transactions, Notifications, Write protection, Hidden records, Phone number resolution and Creating views. Stores the database, the session, transaction and notifier information.

CCommsDatabaseBase is an abstract base class as the CreateDatabaseL() and Open() methods are pure virtual.

Inherits from

Public Member Functions
~CCommsDatabaseBase()
IMPORT_C TIntBeginTransaction()
IMPORT_C voidCancelRequestNotification()
IMPORT_C TIntCheckReadCapability(const TDesC &, const RMessagePtr2 *)
IMPORT_C TIntCheckWriteCapability(const TDesC &, const RMessagePtr2 *)
IMPORT_C TIntCommitTransaction()
IMPORT_C TBoolInTransaction()
IMPORT_C TIntInitializeFilestore()
IMPORT_C TBoolIsDatabaseWriteLockedL()
IMPORT_C CCommsDbTableView *OpenTableLC(const TDesC &)
IMPORT_C CCommsDbTableView *OpenViewLC(const TDesC &, const TDesC &)
IMPORT_C CCommsDbTableView *OpenViewMatchingBoolLC(const TDesC &, const TDesC &, TBool)
IMPORT_C CCommsDbTableView *OpenViewMatchingTextLC(const TDesC &, const TDesC &, const TDesC8 &)
IMPORT_C CCommsDbTableView *OpenViewMatchingTextLC(const TDesC &, const TDesC &, const TDesC16 &)
IMPORT_C CCommsDbTableView *OpenViewMatchingUintLC(const TDesC &, const TDesC &, TUint32)
IMPORT_C TIntRequestNotification(TRequestStatus &)
IMPORT_C voidResolvePhoneNumberFromDatabaseL(TDesC &, TDes &, TParseMode, TUint32, TUint32)
IMPORT_C voidResolvePhoneNumberL(TDesC &, TDes &, TParseMode, TUint32, TUint32)
IMPORT_C voidRollbackTransaction()
IMPORT_C voidShowHiddenRecords()
IMPORT_C TVersionVersion()
Protected Member Functions
CCommsDatabaseBase()
voidBeginInternalTransactionL()
TInt CheckDBCapability(RDbs::TPolicyType, const TDesC &, const RMessagePtr2 *)
TInt CommitInternalTransaction()
voidConvertToUid(const TDesC &, TUint32, TCommDbPublishSubscribeNotification &)
voidCreateDatabaseL()
RDbNamedDatabase *Database()
voidDatabaseUpdateHasOccurred()
voidDoClose()
CCommsDbTableView *DoOpenIAPTableViewL(const TDesC &, const TDesC &)
CCommsDbTableView *DoOpenTableViewL(const TDesC &, const TDesC &)
CCommsDbTableView *DoOpenViewMatchingTextL(const TDesC &, const TDesC &, const TDesC8 &, TBool)
CCommsDbTableView *DoOpenViewMatchingTextL(const TDesC &, const TDesC &, const TDesC16 &, TBool)
CCommsDbTableView *DoOpenViewMatchingUintL(const TDesC &, const TDesC &, TUint32, TBool)
TUint32 GetNewNumber(TUid)
TInt NotifyAllChanges()
voidNotifyChangeL(const TDesC &, TUint32)
voidPopulateChargeCardL(TUint32, TChargeCard &)
voidPopulateDialLocationL(TUint32, TDialLocation &)
voidRollbackInternalTransaction()
Private Member Functions
TBool ConvertTableName(const TDesC &, TDes &)
TInt DoCheckReadCapabilityL(const TDesC &, const RMessagePtr2 *)
TInt DoCheckWriteCapabilityL(const TDesC &, const RMessagePtr2 *)
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()
Protected Attributes
RDbNamedDatabase iDatabase
CCommsDatabaseImpl *iImpl
TBool iImplNotCreated
TBool iInInternalTransaction
RArray< TCommDbPublishSubscribeNotification >iNotifications
RDbNotifier iNotifier
TInt iNotifierOpenError
TBool iShowHiddenRecords

Constructor & Destructor Documentation

CCommsDatabaseBase()

IMPORT_CCCommsDatabaseBase()[protected]

~CCommsDatabaseBase()

IMPORT_C~CCommsDatabaseBase()[virtual]

Member Functions Documentation

BeginInternalTransactionL()

voidBeginInternalTransactionL()[protected]

BeginTransaction()

IMPORT_C TIntBeginTransaction()

CancelRequestNotification()

IMPORT_C voidCancelRequestNotification()

CheckDBCapability(RDbs::TPolicyType, const TDesC &, const RMessagePtr2 *)

TInt CheckDBCapability(RDbs::TPolicyTypeaType,
const TDesC &aField,
const RMessagePtr2 *aMessage
)[protected]

Parameters

RDbs::TPolicyType aType
const TDesC & aField
const RMessagePtr2 * aMessage

CheckReadCapability(const TDesC &, const RMessagePtr2 *)

IMPORT_C TIntCheckReadCapability(const TDesC &aField,
const RMessagePtr2 *aMessage
)

Parameters

const TDesC & aField
const RMessagePtr2 * aMessage

CheckWriteCapability(const TDesC &, const RMessagePtr2 *)

IMPORT_C TIntCheckWriteCapability(const TDesC &aField,
const RMessagePtr2 *aMessage
)

Parameters

const TDesC & aField
const RMessagePtr2 * aMessage

CommitInternalTransaction()

TInt CommitInternalTransaction()[protected]

CommitTransaction()

IMPORT_C TIntCommitTransaction()

ConvertTableName(const TDesC &, TDes &)

TBool ConvertTableName(const TDesC &aTableName,
TDes &aResult
)[private]

Parameters

const TDesC & aTableName
TDes & aResult

ConvertToUid(const TDesC &, TUint32, TCommDbPublishSubscribeNotification &)

voidConvertToUid(const TDesC &aSetting,
TUint32aVal,
TCommDbPublishSubscribeNotification &aNotification
)[protected]

Parameters

const TDesC & aSetting
TUint32 aVal
TCommDbPublishSubscribeNotification & aNotification

CreateDatabaseL()

voidCreateDatabaseL()[protected, pure virtual]

Database()

RDbNamedDatabase *Database()[protected, inline]

Returns the interface for creating and opening a database identified by name and format.

A pointer to the interface for creating and opening a database identified by name and format.

DatabaseUpdateHasOccurred()

voidDatabaseUpdateHasOccurred()[protected]

DoCheckReadCapabilityL(const TDesC &, const RMessagePtr2 *)

TInt DoCheckReadCapabilityL(const TDesC &aField,
const RMessagePtr2 *aMessage
)[private]

Parameters

const TDesC & aField
const RMessagePtr2 * aMessage

DoCheckWriteCapabilityL(const TDesC &, const RMessagePtr2 *)

TInt DoCheckWriteCapabilityL(const TDesC &aField,
const RMessagePtr2 *aMessage
)[private]

Parameters

const TDesC & aField
const RMessagePtr2 * aMessage

DoClose()

voidDoClose()[protected]

DoOpenIAPTableViewL(const TDesC &, const TDesC &)

CCommsDbTableView *DoOpenIAPTableViewL(const TDesC &aTableName,
const TDesC &aSqlQuery
)[protected]

Parameters

const TDesC & aTableName
const TDesC & aSqlQuery

DoOpenTableViewL(const TDesC &, const TDesC &)

CCommsDbTableView *DoOpenTableViewL(const TDesC &aTableName,
const TDesC &aSqlQuery
)[protected]

Parameters

const TDesC & aTableName
const TDesC & aSqlQuery

DoOpenViewMatchingTextL(const TDesC &, const TDesC &, const TDesC8 &, TBool)

CCommsDbTableView *DoOpenViewMatchingTextL(const TDesC &aTableName,
const TDesC &aColumnToMatch,
const TDesC8 &aValueToMatch,
TBoolaIncludeHiddenRecords
)[protected]

Parameters

const TDesC & aTableName
const TDesC & aColumnToMatch
const TDesC8 & aValueToMatch
TBool aIncludeHiddenRecords

DoOpenViewMatchingTextL(const TDesC &, const TDesC &, const TDesC16 &, TBool)

CCommsDbTableView *DoOpenViewMatchingTextL(const TDesC &aTableName,
const TDesC &aColumnToMatch,
const TDesC16 &aValueToMatch,
TBoolaIncludeHiddenRecords
)[protected]

Parameters

const TDesC & aTableName
const TDesC & aColumnToMatch
const TDesC16 & aValueToMatch
TBool aIncludeHiddenRecords

DoOpenViewMatchingUintL(const TDesC &, const TDesC &, TUint32, TBool)

CCommsDbTableView *DoOpenViewMatchingUintL(const TDesC &aTableName,
const TDesC &aColumnToMatch,
TUint32aValueToMatch,
TBoolaIncludeHiddenRecords
)[protected]

Parameters

const TDesC & aTableName
const TDesC & aColumnToMatch
TUint32 aValueToMatch
TBool aIncludeHiddenRecords

GetNewNumber(TUid)

TUint32 GetNewNumber(TUidaUid)[protected]

Parameters

TUid aUid

InTransaction()

IMPORT_C TBoolInTransaction()

InitializeFilestore()

IMPORT_C TIntInitializeFilestore()[static]

IsDatabaseWriteLockedL()

IMPORT_C TBoolIsDatabaseWriteLockedL()

NotifyAllChanges()

TInt NotifyAllChanges()[protected]

NotifyChangeL(const TDesC &, TUint32)

voidNotifyChangeL(const TDesC &aSetting,
TUint32aVal
)[protected]

Parameters

const TDesC & aSetting
TUint32 aVal

OpenTableLC(const TDesC &)

IMPORT_C CCommsDbTableView *OpenTableLC(const TDesC &aTableName)

Parameters

const TDesC & aTableName

OpenViewLC(const TDesC &, const TDesC &)

IMPORT_C CCommsDbTableView *OpenViewLC(const TDesC &aTableName,
const TDesC &aSqlQuery
)

Parameters

const TDesC & aTableName
const TDesC & aSqlQuery

OpenViewMatchingBoolLC(const TDesC &, const TDesC &, TBool)

IMPORT_C CCommsDbTableView *OpenViewMatchingBoolLC(const TDesC &aTableName,
const TDesC &aColumnToMatch,
TBoolaValueToMatch
)

Parameters

const TDesC & aTableName
const TDesC & aColumnToMatch
TBool aValueToMatch

OpenViewMatchingTextLC(const TDesC &, const TDesC &, const TDesC8 &)

IMPORT_C CCommsDbTableView *OpenViewMatchingTextLC(const TDesC &aTableName,
const TDesC &aColumnToMatch,
const TDesC8 &aValueToMatch
)

Parameters

const TDesC & aTableName
const TDesC & aColumnToMatch
const TDesC8 & aValueToMatch

OpenViewMatchingTextLC(const TDesC &, const TDesC &, const TDesC16 &)

IMPORT_C CCommsDbTableView *OpenViewMatchingTextLC(const TDesC &aTableName,
const TDesC &aColumnToMatch,
const TDesC16 &aValueToMatch
)

Parameters

const TDesC & aTableName
const TDesC & aColumnToMatch
const TDesC16 & aValueToMatch

OpenViewMatchingUintLC(const TDesC &, const TDesC &, TUint32)

IMPORT_C CCommsDbTableView *OpenViewMatchingUintLC(const TDesC &aTableName,
const TDesC &aColumnToMatch,
TUint32aValueToMatch
)

Parameters

const TDesC & aTableName
const TDesC & aColumnToMatch
TUint32 aValueToMatch

PopulateChargeCardL(TUint32, TChargeCard &)

voidPopulateChargeCardL(TUint32aId,
TChargeCard &aChargeCard
)[protected]

Parameters

TUint32 aId
TChargeCard & aChargeCard

PopulateDialLocationL(TUint32, TDialLocation &)

voidPopulateDialLocationL(TUint32aId,
TDialLocation &aLocation
)[protected]

Parameters

TUint32 aId
TDialLocation & aLocation

RequestNotification(TRequestStatus &)

IMPORT_C TIntRequestNotification(TRequestStatus &aStatus)

Parameters

TRequestStatus & aStatus

ResolvePhoneNumberFromDatabaseL(TDesC &, TDes &, TParseMode, TUint32, TUint32)

IMPORT_C voidResolvePhoneNumberFromDatabaseL(TDesC &aNumber,
TDes &aDialString,
TParseModeaDialParseMode,
TUint32aLocationId,
TUint32aChargecardId
)

Parameters

TDesC & aNumber
TDes & aDialString
TParseMode aDialParseMode
TUint32 aLocationId
TUint32 aChargecardId

ResolvePhoneNumberL(TDesC &, TDes &, TParseMode, TUint32, TUint32)

IMPORT_C voidResolvePhoneNumberL(TDesC &aNumber,
TDes &aDialString,
TParseModeaDialParseMode,
TUint32aLocationId,
TUint32aChargecardId
)[static]

Parameters

TDesC & aNumber
TDes & aDialString
TParseMode aDialParseMode
TUint32 aLocationId
TUint32 aChargecardId

RollbackInternalTransaction()

voidRollbackInternalTransaction()[protected]

RollbackTransaction()

IMPORT_C voidRollbackTransaction()

ShowHiddenRecords()

IMPORT_C voidShowHiddenRecords()

Version()

IMPORT_C TVersionVersion()const

Member Data Documentation

RDbNamedDatabase iDatabase

RDbNamedDatabase iDatabase[protected]

CCommsDatabaseImpl * iImpl

CCommsDatabaseImpl *iImpl[protected]

TBool iImplNotCreated

TBool iImplNotCreated[protected]

TBool iInInternalTransaction

TBool iInInternalTransaction[protected]

RArray< TCommDbPublishSubscribeNotification > iNotifications

RArray< TCommDbPublishSubscribeNotification >iNotifications[protected]

RDbNotifier iNotifier

RDbNotifier iNotifier[protected]

TInt iNotifierOpenError

TInt iNotifierOpenError[protected]

TBool iShowHiddenRecords

TBool iShowHiddenRecords[protected]