diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-05-30 19:40:31 +0900 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2022-05-30 21:55:12 +0200 |
commit | 9d7329284fd42187092c829ae6ed030561002776 (patch) | |
tree | 1d53503d17938eca725caee7ff783fccf52ca509 /src/include/radio_interfaces.h | |
parent | fac82f62f156c76cb4b23c313111283b30a778b5 (diff) | |
download | tderadio-9d732928.tar.gz tderadio-9d732928.zip |
Standardize folder structure.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit d95a4fea540b371fa86493d069fdbd54f33c5b40)
Diffstat (limited to 'src/include/radio_interfaces.h')
-rw-r--r-- | src/include/radio_interfaces.h | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/src/include/radio_interfaces.h b/src/include/radio_interfaces.h new file mode 100644 index 0000000..009df8c --- /dev/null +++ b/src/include/radio_interfaces.h @@ -0,0 +1,117 @@ +/*************************************************************************** + radio_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: * + * * + * IRadio(Client) * + * * + ***************************************************************************/ + +#ifndef KRADIO_RADIO_INTERFACES_H +#define KRADIO_RADIO_INTERFACES_H + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include "interfaces.h" +#include "soundstreamid.h" + +class RadioStation; +class StationList; + + +/////////////////////////////////////////////////////////////////////// + + +INTERFACE(IRadio, IRadioClient) +{ +public : + IF_CON_DESTRUCTOR(IRadio, -1) + +RECEIVERS: + IF_RECEIVER( powerOn() ) + IF_RECEIVER( powerOff() ) + IF_RECEIVER( activateStation(const RadioStation &rs) ) + IF_RECEIVER( activateStation(int index) ) + IF_RECEIVER( setStations(const StationList &sl) ) + IF_RECEIVER( setPresetFile(const TQString &f) ) + +SENDERS: + IF_SENDER ( notifyPowerChanged(bool on) ) + IF_SENDER ( notifyStationChanged (const RadioStation &, int idx) ) + IF_SENDER ( notifyStationsChanged(const StationList &sl) ) + IF_SENDER ( notifyPresetFileChanged(const TQString &sl) ) + IF_SENDER ( notifyCurrentSoundStreamIDChanged(SoundStreamID id) ) + +ANSWERS: + IF_ANSWER ( bool isPowerOn() const ) + IF_ANSWER ( bool isPowerOff() const ) + IF_ANSWER ( const RadioStation & getCurrentStation() const ) + IF_ANSWER ( int getStationIdx(const RadioStation &rs) const ) + IF_ANSWER ( int getCurrentStationIdx() const ) + IF_ANSWER ( const StationList & getStations() const ) + IF_ANSWER ( const TQString & getPresetFile() const ); + + IF_ANSWER ( SoundStreamID getCurrentSoundStreamID() const ); + +}; + + +INTERFACE(IRadioClient, IRadio) +{ +friend class IRadio; + +public : + IF_CON_DESTRUCTOR(IRadioClient, 1) + +SENDERS: + IF_SENDER ( sendPowerOn() ) + IF_SENDER ( sendPowerOff() ) + IF_SENDER ( sendActivateStation(const RadioStation &rs) ) + IF_SENDER ( sendActivateStation(int index) ) + IF_SENDER ( sendStations(const StationList &sl) ) + IF_SENDER ( sendPresetFile(const TQString &f) ) + +RECEIVERS: + IF_RECEIVER( noticePowerChanged(bool on) ) + IF_RECEIVER( noticeStationChanged (const RadioStation &, int idx) ) + IF_RECEIVER( noticeStationsChanged(const StationList &sl) ) + IF_RECEIVER( noticePresetFileChanged(const TQString &f) ) + IF_RECEIVER( noticeCurrentSoundStreamIDChanged(SoundStreamID id)) + +QUERIES: + IF_QUERY ( bool queryIsPowerOn() ) + IF_QUERY ( bool queryIsPowerOff() ) + IF_QUERY ( const RadioStation & queryCurrentStation() ) + IF_QUERY ( int queryStationIdx(const RadioStation &rs) ) + IF_QUERY ( int queryCurrentStationIdx() ) + IF_QUERY ( const StationList & queryStations() ) + IF_QUERY ( const TQString & queryPresetFile() ) + + IF_QUERY ( SoundStreamID queryCurrentSoundStreamID() ); + +RECEIVERS: + virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); + virtual void noticeDisconnectedI (cmplInterface *, bool pointer_valid); +}; + + + +#endif |