diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-22 18:23:26 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-22 18:23:26 +0000 |
commit | ae364d9bed0589bf1a22cd5f530c563462379e3e (patch) | |
tree | e32727e2664e7ce68d0d30270afa040320ae35a1 /kradio3/src/include/radio_interfaces.h | |
download | tderadio-ae364d9bed0589bf1a22cd5f530c563462379e3e.tar.gz tderadio-ae364d9bed0589bf1a22cd5f530c563462379e3e.zip |
Added old KDE3 version of kradio
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1094417 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kradio3/src/include/radio_interfaces.h')
-rw-r--r-- | kradio3/src/include/radio_interfaces.h | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/kradio3/src/include/radio_interfaces.h b/kradio3/src/include/radio_interfaces.h new file mode 100644 index 0000000..12a9037 --- /dev/null +++ b/kradio3/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 : [email protected] + ***************************************************************************/ + +/*************************************************************************** + * * + * 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 QString &f) ) + +SENDERS: + IF_SENDER ( notifyPowerChanged(bool on) ) + IF_SENDER ( notifyStationChanged (const RadioStation &, int idx) ) + IF_SENDER ( notifyStationsChanged(const StationList &sl) ) + IF_SENDER ( notifyPresetFileChanged(const QString &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 QString & 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 QString &f) ) + +RECEIVERS: + IF_RECEIVER( noticePowerChanged(bool on) ) + IF_RECEIVER( noticeStationChanged (const RadioStation &, int idx) ) + IF_RECEIVER( noticeStationsChanged(const StationList &sl) ) + IF_RECEIVER( noticePresetFileChanged(const QString &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 QString & queryPresetFile() ) + + IF_QUERY ( SoundStreamID queryCurrentSoundStreamID() ); + +RECEIVERS: + virtual void noticeConnectedI (cmplInterface *, bool pointer_valid); + virtual void noticeDisconnectedI (cmplInterface *, bool pointer_valid); +}; + + + +#endif |