streamdirectoryservice.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2008-2009  Tim Fechtner < urwald at users dot sourceforge dot net >
00003 
00004     This program is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU General Public License as
00006     published by the Free Software Foundation; either version 2 of
00007     the License or (at your option) version 3 or any later version
00008     accepted by the membership of KDE e.V. (or its successor approved
00009     by the membership of KDE e.V.), which shall act as a proxy
00010     defined in Section 14 of version 3 of the license.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00019 */
00020 
00021 #ifndef STREAMDIRECTORYSERVICE_H
00022 #define STREAMDIRECTORYSERVICE_H
00023 
00024 #include <QPointer>
00025 #include "stationdirectorytree.h"
00026 
00045 class streamDirectoryService : public QObject
00046 {
00047 
00048   Q_OBJECT
00049 
00050   friend class stationDirectoryTree; // TODO wende das nur auf die absolut nötigsten Funktionen an!
00051 
00060   Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled)
00061 
00062   public:
00066     explicit streamDirectoryService(QObject *parent = 0);
00068     virtual ~streamDirectoryService();
00070     bool isEnabled() const;
00072     void setEnabled(const bool value);
00073 
00074   protected:
00080     void addStreamToWidget(const QString & genre,
00081                            const QString & streamName,
00082                            const quint64 bitrate,
00083                            const QString & currentlyPlaying = QString());
00091     virtual void kickOffStreamFetch() = 0;
00098     virtual void stopStreamFetch() = 0;
00099 
00100   private:
00105     bool fetchIsRunning;
00107     void helper_start();
00110     void helper_stop();
00112     bool internal_enabled;
00115     QPointer<stationDirectoryTree> widget;
00122     void setWidget(stationDirectoryTree *newWidget);
00123 };
00124 
00125 #endif

Generated on Sat May 2 10:43:44 2009 for kradioripper by  doxygen 1.5.6