summaryrefslogtreecommitdiffstats
path: root/kradio3/src/include/timecontrol_interfaces.h
blob: ad743a4dfc67e3516217af302432f204f45ea01d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/***************************************************************************
                          timecontrol_interfaces.h  -  description
                             -------------------
    begin                : Mon Mär 10 2003
    copyright            : (C) 2003 by Martin Witte
    email                : witte@kawo1.rwth-aachen.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   Interfaces in this header:                                            *
 *                                                                         *
 *   ITimeControl(Client)                                                  *
 *                                                                         *
 ***************************************************************************/


#ifndef KRADIO_TIMECONTROL_INTERFACES_H
#define KRADIO_TIMECONTROL_INTERFACES_H

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "interfaces.h"
#include "alarm.h"

INTERFACE(ITimeControl, ITimeControlClient)
{
public :
    IF_CON_DESTRUCTOR(ITimeControl, -1)

RECEIVERS:
    IF_RECEIVER(    setAlarms(const AlarmVector &sl)                 )
    IF_RECEIVER(    setCountdownSeconds(int n)                       )
    IF_RECEIVER(    startCountdown()                                 )
    IF_RECEIVER(    stopCountdown()                                  )


SENDERS:
    IF_SENDER  (    notifyAlarmsChanged(const AlarmVector &sl)       )
    IF_SENDER  (    notifyAlarm(const Alarm &)                       )
    IF_SENDER  (    notifyNextAlarmChanged(const Alarm *)            )
    IF_SENDER  (    notifyCountdownStarted(const QDateTime &end)     )
    IF_SENDER  (    notifyCountdownStopped()                         )
    IF_SENDER  (    notifyCountdownZero()                            )
    IF_SENDER  (    notifyCountdownSecondsChanged(int n)             )


ANSWERS:
    IF_ANSWER  (    QDateTime           getNextAlarmTime () const    )
    IF_ANSWER  (    const Alarm*        getNextAlarm () const        )
    IF_ANSWER  (    const AlarmVector & getAlarms () const           )
    IF_ANSWER  (    int                 getCountdownSeconds () const )
    IF_ANSWER  (    QDateTime           getCountdownEnd () const     )

};


INTERFACE(ITimeControlClient, ITimeControl)
{
public :
    IF_CON_DESTRUCTOR(ITimeControlClient, 1)

SENDERS:
    IF_SENDER  (    sendAlarms(const AlarmVector &sl)                )
    IF_SENDER  (    sendCountdownSeconds(int n)                      )
    IF_SENDER  (    sendStartCountdown()                             )
    IF_SENDER  (    sendStopCountdown()                              )


RECEIVERS:
    IF_RECEIVER(    noticeAlarmsChanged(const AlarmVector &sl)       )
    IF_RECEIVER(    noticeAlarm(const Alarm &)                       )
    IF_RECEIVER(    noticeNextAlarmChanged(const Alarm *)            )
    IF_RECEIVER(    noticeCountdownStarted(const QDateTime &end)     )
    IF_RECEIVER(    noticeCountdownStopped()                         )
    IF_RECEIVER(    noticeCountdownZero()                            )
    IF_RECEIVER(    noticeCountdownSecondsChanged(int n)             )


QUERIES:
    IF_QUERY   (    QDateTime           queryNextAlarmTime()         )
    IF_QUERY   (    const Alarm*        queryNextAlarm ()            )
    IF_QUERY   (    const AlarmVector & queryAlarms ()               )
    IF_QUERY   (    int                 queryCountdownSeconds ()     )
    IF_QUERY   (    QDateTime           queryCountdownEnd ()         )

RECEIVERS:
    virtual void noticeConnectedI    (cmplInterface *, bool /*pointer_valid*/);
    virtual void noticeDisconnectedI (cmplInterface *, bool /*pointer_valid*/);
};




#endif