2
* Copyright 2013 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Author: Zsombor Egri <zsombor.egri@canonical.com>
19
#ifndef ALARMMANAGER_P_H
20
#define ALARMMANAGER_P_H
23
#include "ucalarm_p.h"
24
#include "alarmmanager_p.h"
25
#include <QtCore/QUrl>
27
class AlarmManagerPrivate
29
Q_DECLARE_PUBLIC(AlarmManager)
31
AlarmManagerPrivate(AlarmManager *qq);
32
virtual ~AlarmManagerPrivate();
34
static AlarmManagerPrivate *get(AlarmManager *instance = 0) {
36
return AlarmManager::instance().d_ptr.data();
38
return instance->d_ptr.data();
45
virtual void init() = 0;
46
virtual bool fetchAlarms() = 0;
47
virtual int alarmCount() = 0;
48
virtual UCAlarm *getAlarmAt(int index) const = 0;
49
virtual bool findAlarm(const UCAlarm &alarm, const QVariant &cookie) const = 0;
51
// function to verify whether the given alarm property has a given value set
52
// used for testing purposes
53
virtual bool verifyChange(UCAlarm *alarm, AlarmManager::Change change, const QVariant &value) = 0;
55
// creates an alarm data adaptation object
56
virtual UCAlarmPrivate *createAlarmData(UCAlarm *alarm) = 0;
59
AlarmManagerPrivate * createAlarmsAdapter(AlarmManager *alarms);
61
#endif // ALARMMANAGER_P_H