CEvtDatabase Class Reference

class CEvtDatabase : public CBase
Interface class to Location Events Database. This class allows for Events to be stored in persistent database
  • Sqlite. Events can be added, deleted and modified from database.

evtstorage.lib
Since
S60 v9.1

Inherits from

Public Member Functions
~CEvtDatabase ()
void AddEventL ( CEvtEvent &)
CEvtEvent * GetEventL ( TEvtEventId )
void GetEventsL ( TEvtEventStatus , RPointerArray < CEvtBasicEventInfo > &)
void GetEventsL ( RPointerArray < CEvtBasicEventInfo > &)
void HandleDbChangedL ()
CEvtDatabase * NewL ()
CEvtDatabase * NewLC ()
void RemoveEventL ( TEvtEventId )
void RemoveEventsL (const RArray < TEvtEventId > &)
void SetObserver ( MEvtStorageDbObserver *)
void UpdateEventL ( CEvtEvent &)
void UpdateEventStatusL ( TEvtEventId , TEvtEventStatus )
void UpdateEventsStatusL (const RArray < TEvtEventId > &, TEvtEventStatus )
Private Member Functions
CEvtDatabase ()
TBool CheckIfActionPresentL ( TInt64 )
TBool CheckIfEventPresentL ( TEvtEventId )
void CloseDatabase ()
void ConstructL ()
void CreateActionL ( CEvtAction &)
void CreateIndexL ()
void CreateOpenDatabaseL ()
void CreateSchemaL ()
void CreateTablesL ()
void CreateTriggerL ()
void DeleteActionL ( TEvtEventId )
void DeleteEventL ( TEvtEventId )
TInt64 GetActionId ( TEvtEventId )
void GetEventsL ( RSqlStatement &, RPointerArray < CEvtBasicEventInfo > &)
void OpenDatabaseL ()
void UpdateActionL ( CEvtAction &)
void UpdateEventTableL ( CEvtEvent &)
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
RSqlDatabase iDb
CEvtDbNotifier * iDbNotifier
MEvtStorageDbObserver * iStorageDbObserver

Constructor & Destructor Documentation

CEvtDatabase()

CEvtDatabase ( ) [private]

Default C++ Constructor.

~CEvtDatabase()

~CEvtDatabase ( ) [virtual]

Destructor.

Member Functions Documentation

AddEventL(CEvtEvent &)

void AddEventL ( CEvtEvent & aEvtEvent )

Insert Event to database.

Parameters

CEvtEvent & aEvtEvent

CheckIfActionPresentL(TInt64)

TBool CheckIfActionPresentL ( TInt64 aId ) [private]

check if Action is present.

Parameters

TInt64 aId

CheckIfEventPresentL(TEvtEventId)

TBool CheckIfEventPresentL ( TEvtEventId aId ) [private]

check if Event is present.

Parameters

TEvtEventId aId

CloseDatabase()

void CloseDatabase ( ) [private]

Close Database Connection.

ConstructL()

void ConstructL ( ) [private]

Second phase of the two phase constructor.

CreateActionL(CEvtAction &)

void CreateActionL ( CEvtAction & aEvtAction ) [private]

Create Action.

Parameters

CEvtAction & aEvtAction

CreateIndexL()

void CreateIndexL ( ) [private]

Create All the Indexes.

CreateOpenDatabaseL()

void CreateOpenDatabaseL ( ) [private]

Create and Open Database Connection.

CreateSchemaL()

void CreateSchemaL ( ) [private]

Create the Schema for Events Storage.

CreateTablesL()

void CreateTablesL ( ) [private]

Create All the Tables.

CreateTriggerL()

void CreateTriggerL ( ) [private]

Create All the related Triggers.

DeleteActionL(TEvtEventId)

void DeleteActionL ( TEvtEventId aEventId ) [private]

Delete Action.

Parameters

TEvtEventId aEventId

DeleteEventL(TEvtEventId)

void DeleteEventL ( TEvtEventId aEventId ) [private]

Delete Event.

Parameters

TEvtEventId aEventId

GetActionId(TEvtEventId)

TInt64 GetActionId ( TEvtEventId aId ) [private]

Get the action Id based on Event Id.

Parameters

TEvtEventId aId

GetEventL(TEvtEventId)

CEvtEvent * GetEventL ( TEvtEventId aEvtId )

Get Event based on unique Id.

Parameters

TEvtEventId aEvtId

GetEventsL(TEvtEventStatus, RPointerArray< CEvtBasicEventInfo > &)

void GetEventsL ( TEvtEventStatus aEvtStatus,
RPointerArray < CEvtBasicEventInfo > & aEvtEventArray
)

Get Events List based on status.

Parameters

TEvtEventStatus aEvtStatus
RPointerArray < CEvtBasicEventInfo > & aEvtEventArray

GetEventsL(RPointerArray< CEvtBasicEventInfo > &)

void GetEventsL ( RPointerArray < CEvtBasicEventInfo > & aEvtEventArray )

Get Events List based on status.

Parameters

RPointerArray < CEvtBasicEventInfo > & aEvtEventArray

GetEventsL(RSqlStatement &, RPointerArray< CEvtBasicEventInfo > &)

void GetEventsL ( RSqlStatement & aStmt,
RPointerArray < CEvtBasicEventInfo > & aEvtEventArray
) [private]

Get Events based on Query String.

Parameters

RSqlStatement & aStmt
RPointerArray < CEvtBasicEventInfo > & aEvtEventArray

HandleDbChangedL()

void HandleDbChangedL ( )

Observer for TDbChangeType changes in Storage Database.

NewL()

CEvtDatabase * NewL ( ) [static]

Constructs a new instance of CEvtDatabase .

leave
System wide error code if the object creation fails.

NewLC()

CEvtDatabase * NewLC ( ) [static]

Constructs a new instance of Event Storage Manager interface. Leaves the created instance on the cleanup stack.

leave
System wide error code if the object creation fails.

OpenDatabaseL()

void OpenDatabaseL ( ) [private]

Open Database Connection.

RemoveEventL(TEvtEventId)

void RemoveEventL ( TEvtEventId aEvtId )

Remove Event from database based on unique Id.

Parameters

TEvtEventId aEvtId

RemoveEventsL(const RArray< TEvtEventId > &)

void RemoveEventsL ( const RArray < TEvtEventId > & aEvtIdArray )

Remove Events from database.

Parameters

const RArray < TEvtEventId > & aEvtIdArray

SetObserver(MEvtStorageDbObserver *)

void SetObserver ( MEvtStorageDbObserver * aStorageDbObserver )

Set the Observer fo Storage Database.

Parameters

MEvtStorageDbObserver * aStorageDbObserver

UpdateActionL(CEvtAction &)

void UpdateActionL ( CEvtAction & aEvtAction ) [private]

Update Action.

Parameters

CEvtAction & aEvtAction

UpdateEventL(CEvtEvent &)

void UpdateEventL ( CEvtEvent & aEvtEvent )

Update Event based on unique Id.

Parameters

CEvtEvent & aEvtEvent

UpdateEventStatusL(TEvtEventId, TEvtEventStatus)

void UpdateEventStatusL ( TEvtEventId aEvtId,
TEvtEventStatus aEvtStatus
)

Update Event Status based on unique Id.

Parameters

TEvtEventId aEvtId
TEvtEventStatus aEvtStatus

UpdateEventTableL(CEvtEvent &)

void UpdateEventTableL ( CEvtEvent & aEvtEvent ) [private]

Update Event Table.

Parameters

CEvtEvent & aEvtEvent

UpdateEventsStatusL(const RArray< TEvtEventId > &, TEvtEventStatus)

void UpdateEventsStatusL ( const RArray < TEvtEventId > & aEventArray,
TEvtEventStatus aEvtStatus
)

Update Event Status.

Parameters

const RArray < TEvtEventId > & aEventArray
TEvtEventStatus aEvtStatus

Member Data Documentation

RSqlDatabase iDb

RSqlDatabase iDb [private]

CEvtDbNotifier * iDbNotifier

CEvtDbNotifier * iDbNotifier [private]

MEvtStorageDbObserver * iStorageDbObserver

MEvtStorageDbObserver * iStorageDbObserver [private]