CActiveApDb Class Reference

API published in: S60 1st Ed
API deprecated in: S60 3rd Ed FP 2

Link against: apengine.lib

Capability Information

Required Capabilities

None

Exceptions

Functions modifying database (Create, Update, Delete) need WriteDeviceData. (CApDataHandler, CApUtils Setxxx functions)


#include <activeapdb.h>

Detailed Description

This class manages and guards database integrity by handling all events that are related to the database.

These events may originate from the system (Shutdown, Backup/Restore) and from the database itself. The events are transformed into a simple protocol, defined by MActiveApDbObserver. Expects an active scheduler to be installed and running.


Public Member Functions

virtual IMPORT_C  ~CActiveApDb ()
  Destructor.
IMPORT_C void  AddObserverL (MActiveApDbObserver *anObserver)
  Adds an observer to the list of observers to be notified about the DB events.
IMPORT_C void  RemoveObserver (MActiveApDbObserver *anObserver)
  Removes an observer.
IMPORT_C CCommsDatabase *  Database ()
  Returns the CCommsDatabase.

Static Public Member Functions

static IMPORT_C CActiveApDb NewL (TCommDbDatabaseType aType=EDatabaseTypeIAP)
  Two-phased constructor.

Protected Member Functions

void  ConstructL ()
  Second phase constructor.

Friends

class  CActiveApDbNotifier

Constructor & Destructor Documentation

virtual IMPORT_C CActiveApDb::~CActiveApDb  )  [virtual]
 

Destructor.

Deprecated:

Member Function Documentation

IMPORT_C void CActiveApDb::AddObserverL MActiveApDbObserver anObserver  ) 
 

Adds an observer to the list of observers to be notified about the DB events.

Also automatically starts observation and notification. The order of notification will be exactly the order of registration.

Parameters:
anObserver  Observer to be notified about database-related events.
Deprecated:
void CActiveApDb::ConstructL  )  [protected]
 

Second phase constructor.

Leaves on failure.

Parameters:
aType  The desired type of the CCommsDatabase object. events.
IMPORT_C CCommsDatabase* CActiveApDb::Database  ) 
 

Returns the CCommsDatabase.

Required because we can not derive from CCommsDatabase...

Deprecated:
static IMPORT_C CActiveApDb* CActiveApDb::NewL TCommDbDatabaseType  aType = EDatabaseTypeIAP  )  [static]
 

Two-phased constructor.

Leaves on failure.

Parameters:
aType  The desired type of the CCommsDatabase object. Defaults to EDatabaseTypeIAP.
Returns:
The constructed CActiveApDb object.
Deprecated:
IMPORT_C void CActiveApDb::RemoveObserver MActiveApDbObserver anObserver  ) 
 

Removes an observer.

If not added, silently ignores.

Parameters:
anObserver  The observer.
Deprecated:

Friends And Related Function Documentation

friend class CActiveApDbNotifier [friend]
 

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top