Buteo Synchronization Framework: SyncAlarmInventory Class Reference

Buteo Synchronization Framework

Signals | Public Member Functions | List of all members
SyncAlarmInventory Class Reference

Class for storing alarms. More...

`#include <SyncAlarmInventory.h>`

Inheritance diagram for SyncAlarmInventory:

## Signals
void | triggerAlarm (int alarmId)
| Signal triggered when an alarm expired. More...

## Public Member Functions
| SyncAlarmInventory ()
| ~SyncAlarmInventory ()
bool | init ()
| Creates and Initialize the alarms database. also Creates the timers Please call this function to make sure the database is initialised properly. More...
int | addAlarm (QDateTime alarmTime)
| Method to add an alarm. More...
bool | removeAlarm (int alarmId)
void | removeAllAlarms ()

## Detailed Description

Class for storing alarms.

This class stores alarms for scheduled synchronizations. The main elements are the sync time and the alarm id

## Constructor & Destructor Documentation

## ◆ SyncAlarmInventory()

SyncAlarmInventory::SyncAlarmInventory | ( |  | ) |

The alarm inventory constructor Always Call init() before using other methods of this class

## ◆ ~SyncAlarmInventory()

SyncAlarmInventory::~SyncAlarmInventory | ( |  | ) |

The alarm inventory destructor

## Member Function Documentation

## ◆ addAlarm()

int SyncAlarmInventory::addAlarm | ( | QDateTime | alarmTime | ) |

Method to add an alarm.

Parameters

  alarmTime | - time of the alarm as QDateTime

Returns
  id of the alarm if alarm was added successfully. else 0

## ◆ init()

bool SyncAlarmInventory::init | ( |  | ) |

Creates and Initialize the alarms database. also Creates the timers Please call this function to make sure the database is initialised properly.

Returns
  - status of the initialisation

## ◆ removeAlarm()

bool SyncAlarmInventory::removeAlarm | ( | int | alarmId | ) |

Method to remove an alarm

Parameters

  alarmId | - id of the alarm to remove

Returns
  status of the remove

## ◆ removeAllAlarms()

void SyncAlarmInventory::removeAllAlarms | ( |  | ) |

Method to remove all alarms

## ◆ triggerAlarm

void SyncAlarmInventory::triggerAlarm | ( | int | alarmId | ) |
| signal

Signal triggered when an alarm expired.

Parameters

  alarmId | - id of the alarm that got triggered.

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

- SyncAlarmInventory.h
- moc_SyncAlarmInventory.cpp
- SyncAlarmInventory.cpp