| Classes | Functions | DevRef | Qt API | Qtopia Documentation |

# AlarmServer Class Reference

The AlarmServer class allows alarms to be scheduled and unscheduled. More...

`#include <alarmserver.h>`

List of all member functions.

## Static Public Members

- void addAlarm ( QDateTime when, const QCString & channel, const QCString & message, int data = 0 )
- void deleteAlarm ( QDateTime when, const QCString & channel, const QCString & message, int data = 0 )

## Detailed Description

The AlarmServer class allows alarms to be scheduled and unscheduled.

Applications can schedule alarms with addAlarm() and can unschedule alarms with deleteAlarm(). When the time for an alarm to go off is reached the specified QCop message is sent on the specified channel (optionally with additional data).

See also QCopEnvelope.

## Member Function Documentation

### void AlarmServer::addAlarm ( QDateTime when, const QCString & channel, const QCString & message, int data = 0 )`[static]`

Schedules an alarm to go off at (or soon after) time when. When the alarm goes off, the QCop message will be sent to channel, with data as a parameter.

If this function is called with exactly the same data as a previous call the subsequent call is ignored, so there is only ever one alarm with a given set of parameters.

See also deleteAlarm().

### void AlarmServer::deleteAlarm ( QDateTime when, const QCString & channel, const QCString & message, int data = 0 )`[static]`

Deletes previously scheduled alarms which match when, channel, message, and data.

Passing null values for when, channel, or for the QCop message, acts as a wildcard meaning "any". Similarly, passing -1 for data indicates "any".

If there is no matching alarm, nothing happens.

See also addAlarm().

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