Qt API | Qtopia API | Qtopia Documentation |

# DateBookAccess Class Reference
[qpepim module]

The DateBookAccess class provides a safe API for accessing PimEvents. More...

`#include <qtopia/pim/datebookaccess.h>`

Inherits QObject.

List of all member functions.

## Public Members

- DateBookAccess ()
- ~DateBookAccess ()
- bool editSupported () const
- void updateEvent ( const PimEvent & event )
- void removeEvent ( const PimEvent & ev )
- void addEvent ( const PimEvent & ev )
- PimEvent eventForId ( const QUuid & u, bool * ok = 0 ) const

## Signals

- void dateBookUpdated ()

## Detailed Description

The DateBookAccess class provides a safe API for accessing PimEvents.

DateBookAccess provides a safe API for accessing PimEvents stored by Qtopia's Datebook application. DateBookAccess tries to keep the Datebook application in sync with modifications, and alerts the user of the library when modifications ahve been made by other applications.

See also QPEPIM Library.

## Member Function Documentation

### DateBookAccess::DateBookAccess ()

Constructor.

### DateBookAccess::~DateBookAccess ()

Cleans up the the DataBookAccess.

### void DateBookAccess::addEvent ( const PimEvent & ev )

If supported will assign a new unique ID to ev and add the event to the pim data.

Adding event requires the Events service to be available.

### void DateBookAccess::dateBookUpdated ()`[signal]`

Emitted whenever the datebook is updated.

### bool DateBookAccess::editSupported () const

Returns TRUE if it is possible to add, remove and update events in the pim data. Otherwise returns FALSE.

Adding, removing and updating events requires the Events service to be available

### PimEvent DateBookAccess::eventForId ( const QUuid & u, bool * ok = 0 ) const

If there exists an event with the uid u, return that event. Returns a null event if otherwise.

If ok is non-null, *ok is set to TRUE if the event is found, and FALSE if the event is not found.

### void DateBookAccess::removeEvent ( const PimEvent & ev )

If supported will remove event ev from the pim data.

Removing events requires the Events service to be available.

### void DateBookAccess::updateEvent ( const PimEvent & event )

If supported will update event in the pim data.

Updating events requires the Events service to be available.

This file is part of the Qtopia , copyright © 1995-2002 Trolltech, all rights reserved.