00001 /* 00002 Copyright (C) 2008-2010 Lukas Sommer < SommerLuk at gmail dot com > 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 ICECAST_INTERNALTHREAD_H 00022 #define ICECAST_INTERNALTHREAD_H 00023 00024 #include <QList> 00025 #include <QMutex> 00026 #include <QThread> 00027 #include <QXmlStreamReader> 00028 #include "streamdirectoryentry_stream.h" 00029 00042 class icecast_internalThread : public QThread 00043 { 00044 00045 Q_OBJECT 00046 00047 public: 00053 typedef QList<streamDirectoryEntry_stream *> streamEntryList; 00055 icecast_internalThread(); 00059 virtual ~icecast_internalThread(); 00062 void setFilename(QString newFilename); 00063 00064 signals: 00073 void streamlist_ready(icecast_internalThread::streamEntryList list); 00074 00075 protected: 00077 virtual void run(); 00078 00079 private: 00082 QString filename; 00084 QMutex filename_mutex; 00090 void readStreamEntry(QXmlStreamReader & reader); 00092 streamEntryList streamList; 00093 00094 }; 00095 00096 Q_DECLARE_METATYPE(icecast_internalThread::streamEntryList) 00097 00098 #endif