#include <icecast_internalthread.h>
Public Types | |
typedef QList < streamDirectoryEntry_stream * > | streamEntryList |
Signals | |
void | streamlist_ready (icecast_internalThread::streamEntryList list) |
Public Member Functions | |
icecast_internalThread () | |
virtual | ~icecast_internalThread () |
Protected Member Functions | |
virtual void | run () |
Private Member Functions | |
void | readStreamEntry (QXmlStreamReader &reader) |
Private Attributes | |
streamEntryList | streamList |
This class provides downloading of the "yellow page" file from icecast.org which provides a list of all available Icecast streams.
For each stream it creates a streamDirectoryEntry_stream objects on the heap. After finishing, it emits the signal streamlist_ready with a list of pointers to these objects. It is up to you to make sure that these objects on the head will get deleted!
Definition at line 38 of file icecast_internalthread.h.
typedef QList<streamDirectoryEntry_stream *> icecast_internalThread::streamEntryList |
Defines a type for a list of pointers to streamDirectoryEntry_stream objects. This type is declared as meta type through Q_DECLARE_METATYPE.
qRegisterMetaType<icecast_internalThread::streamEntryList>();
before you can use it in queued signal-slot-connections. Definition at line 49 of file icecast_internalthread.h.
icecast_internalThread::icecast_internalThread | ( | ) |
The constructor.
Definition at line 26 of file icecast_internalthread.cpp.
icecast_internalThread::~icecast_internalThread | ( | ) | [virtual] |
The destructor.
Definition at line 30 of file icecast_internalthread.cpp.
void icecast_internalThread::readStreamEntry | ( | QXmlStreamReader & | reader | ) | [private] |
Helper function that expects that the actual tocken is <entry>
. It reads the entry, constructs the corresponding object on the heap and adds a pointer to it at streamList.
reader | A reference to the QXmlStreamReader object that you're using for processing. |
Definition at line 58 of file icecast_internalthread.cpp.
References streamDirectoryEntry_stream::aac, streamDirectoryEntry_stream::aac_plus, streamDirectoryEntry_stream::bitrate, streamDirectoryEntry_stream::currentlyPlaying, streamDirectoryEntry_stream::mp3, streamDirectoryEntry_stream::nsv, streamDirectoryEntry_stream::ogg, streamDirectoryEntry::setName(), streamDirectoryEntry::setValue(), streamList, streamDirectoryEntry_stream::streamType, and streamDirectoryEntry_stream::unknown.
Referenced by run().
void icecast_internalThread::run | ( | ) | [protected, virtual] |
Internal implementation of the thread.
Definition at line 35 of file icecast_internalthread.cpp.
References readStreamEntry(), streamList, and streamlist_ready().
void icecast_internalThread::streamlist_ready | ( | icecast_internalThread::streamEntryList | list | ) | [signal] |
This signal is emitted after the thread has prepared the data structure.
list | A list with pointers the the objects on the heap. It is up to you to make sure that these objects on the head will get deleted! |
Referenced by run().
Internal list of pointers to the objects on the heap.
Definition at line 80 of file icecast_internalthread.h.
Referenced by readStreamEntry(), and run().