#include <shoutcast.h>
Public Types | |
| enum | State { NOT_CONNECTED, RESOLVING, CONNECTING, CANT_RESOLVE, CANT_CONNECT, CONNECTED, WRITING_HEADER, READING_HEADER, PLAYING, STREAMING, STREAMING_META, STOPPED } |
Signals | |
| void | meta (const QString &metadata) |
| void | changedState (ShoutCastIODevice::State newstate) |
Public Member Functions | |
| ShoutCastIODevice (void) | |
| ~ShoutCastIODevice (void) | |
| void | connectToUrl (const QUrl &url) |
| void | close (void) |
| bool | flush (void) |
| qint64 | size (void) const |
| qint64 | pos (void) const |
| qint64 | bytesAvailable (void) const |
| bool | isSequential (void) const |
| qint64 | readData (char *data, qint64 sz) |
| qint64 | writeData (const char *data, qint64 sz) |
| bool | getResponse (ShoutCastResponse &response) |
Static Public Member Functions | |
| static const char * | stateString (const State &s) |
Private Slots | |
| void | socketHostFound (void) |
| void | socketConnected (void) |
| void | socketConnectionClosed (void) |
| void | socketReadyRead (void) |
| void | socketBytesWritten (qint64) |
| void | socketError (QAbstractSocket::SocketError error) |
Private Member Functions | |
| void | switchToState (const State &s) |
| bool | parseHeader (void) |
| bool | parseMeta (void) |
Private Attributes | |
| ShoutCastResponse * | m_response |
| int | m_redirects |
| QTcpSocket * | m_socket |
| QByteArray | m_scratchpad |
| qint64 | m_scratchpad_pos |
| QUrl | m_url |
| qint64 | m_bytesTillNextMeta |
| State | m_state |
| QString | m_last_metadata |
| qint64 | m_bytesDownloaded |
| bool | m_response_gotten |
| bool | m_started |
Definition at line 33 of file shoutcast.h.
| NOT_CONNECTED | |
| RESOLVING | |
| CONNECTING | |
| CANT_RESOLVE | |
| CANT_CONNECT | |
| CONNECTED | |
| WRITING_HEADER | |
| READING_HEADER | |
| PLAYING | |
| STREAMING | |
| STREAMING_META | |
| STOPPED |
Definition at line 38 of file shoutcast.h.
| ShoutCastIODevice::ShoutCastIODevice | ( | void | ) |
Definition at line 342 of file shoutcast.cpp.
| ShoutCastIODevice::~ShoutCastIODevice | ( | void | ) |
Definition at line 362 of file shoutcast.cpp.
| const char * ShoutCastIODevice::stateString | ( | const State & | s | ) | [static] |
Definition at line 37 of file shoutcast.cpp.
Referenced by readData(), and DecoderIOFactoryShoutCast::shoutcastChangedState().
| void ShoutCastIODevice::connectToUrl | ( | const QUrl & | url | ) |
Definition at line 371 of file shoutcast.cpp.
Referenced by socketReadyRead(), and DecoderIOFactoryShoutCast::start().
| void ShoutCastIODevice::close | ( | void | ) |
Reimplemented from MusicIODevice.
Definition at line 380 of file shoutcast.cpp.
Referenced by DecoderIOFactoryShoutCast::closeIODevice().
| bool ShoutCastIODevice::flush | ( | void | ) |
Reimplemented from MusicIODevice.
Definition at line 385 of file shoutcast.cpp.
| qint64 ShoutCastIODevice::size | ( | void | ) | const |
Reimplemented from MusicIODevice.
Definition at line 390 of file shoutcast.cpp.
| qint64 ShoutCastIODevice::pos | ( | void | ) | const [inline] |
Reimplemented from MusicIODevice.
Definition at line 63 of file shoutcast.h.
| qint64 ShoutCastIODevice::bytesAvailable | ( | void | ) | const |
Reimplemented from MusicIODevice.
Definition at line 452 of file shoutcast.cpp.
Referenced by DecoderIOFactoryShoutCast::periodicallyCheckBuffered().
| bool ShoutCastIODevice::isSequential | ( | void | ) | const [inline] |
Reimplemented from MusicIODevice.
Definition at line 65 of file shoutcast.h.
| qint64 ShoutCastIODevice::readData | ( | char * | data, | |
| qint64 | sz | |||
| ) |
Reimplemented from MusicIODevice.
Definition at line 395 of file shoutcast.cpp.
| qint64 ShoutCastIODevice::writeData | ( | const char * | data, | |
| qint64 | sz | |||
| ) |
Reimplemented from MusicIODevice.
Definition at line 447 of file shoutcast.cpp.
| bool ShoutCastIODevice::getResponse | ( | ShoutCastResponse & | response | ) |
Definition at line 658 of file shoutcast.cpp.
Referenced by DecoderIOFactoryShoutCast::checkResponseOK(), DecoderIOFactoryShoutCast::periodicallyCheckBuffered(), and DecoderIOFactoryShoutCast::periodicallyCheckResponse().
| void ShoutCastIODevice::meta | ( | const QString & | metadata | ) | [signal] |
Referenced by parseMeta().
| void ShoutCastIODevice::changedState | ( | ShoutCastIODevice::State | newstate | ) | [signal] |
Referenced by switchToState().
| void ShoutCastIODevice::socketHostFound | ( | void | ) | [private, slot] |
Definition at line 457 of file shoutcast.cpp.
Referenced by ShoutCastIODevice().
| void ShoutCastIODevice::socketConnected | ( | void | ) | [private, slot] |
Definition at line 463 of file shoutcast.cpp.
Referenced by ShoutCastIODevice().
| void ShoutCastIODevice::socketConnectionClosed | ( | void | ) | [private, slot] |
Definition at line 491 of file shoutcast.cpp.
Referenced by ShoutCastIODevice().
| void ShoutCastIODevice::socketReadyRead | ( | void | ) | [private, slot] |
Definition at line 497 of file shoutcast.cpp.
Referenced by readData(), and ShoutCastIODevice().
| void ShoutCastIODevice::socketBytesWritten | ( | qint64 | ) | [private, slot] |
Definition at line 553 of file shoutcast.cpp.
Referenced by socketConnected().
| void ShoutCastIODevice::socketError | ( | QAbstractSocket::SocketError | error | ) | [private, slot] |
Definition at line 569 of file shoutcast.cpp.
Referenced by ShoutCastIODevice().
| void ShoutCastIODevice::switchToState | ( | const State & | s | ) | [private] |
Definition at line 601 of file shoutcast.cpp.
Referenced by connectToUrl(), parseMeta(), readData(), ShoutCastIODevice(), socketBytesWritten(), socketConnected(), socketConnectionClosed(), socketError(), socketHostFound(), and socketReadyRead().
| bool ShoutCastIODevice::parseHeader | ( | void | ) | [private] |
Definition at line 626 of file shoutcast.cpp.
Referenced by socketReadyRead().
| bool ShoutCastIODevice::parseMeta | ( | void | ) | [private] |
Definition at line 667 of file shoutcast.cpp.
Referenced by readData().
ShoutCastResponse* ShoutCastIODevice::m_response [private] |
Definition at line 90 of file shoutcast.h.
Referenced by getResponse(), parseHeader(), readData(), ShoutCastIODevice(), socketReadyRead(), switchToState(), and ~ShoutCastIODevice().
int ShoutCastIODevice::m_redirects [private] |
Definition at line 91 of file shoutcast.h.
Referenced by socketReadyRead().
QTcpSocket* ShoutCastIODevice::m_socket [private] |
Definition at line 92 of file shoutcast.h.
Referenced by close(), connectToUrl(), flush(), ShoutCastIODevice(), socketBytesWritten(), socketConnected(), socketReadyRead(), switchToState(), writeData(), and ~ShoutCastIODevice().
QByteArray ShoutCastIODevice::m_scratchpad [private] |
Definition at line 95 of file shoutcast.h.
Referenced by socketBytesWritten(), and socketConnected().
qint64 ShoutCastIODevice::m_scratchpad_pos [private] |
Definition at line 96 of file shoutcast.h.
Referenced by socketBytesWritten(), and socketConnected().
QUrl ShoutCastIODevice::m_url [private] |
Definition at line 99 of file shoutcast.h.
Referenced by connectToUrl(), socketConnected(), and socketReadyRead().
qint64 ShoutCastIODevice::m_bytesTillNextMeta [private] |
Definition at line 100 of file shoutcast.h.
Referenced by readData(), socketConnected(), socketReadyRead(), and switchToState().
State ShoutCastIODevice::m_state [private] |
Definition at line 101 of file shoutcast.h.
Referenced by readData(), socketReadyRead(), and switchToState().
QString ShoutCastIODevice::m_last_metadata [private] |
Definition at line 102 of file shoutcast.h.
Referenced by parseMeta().
qint64 ShoutCastIODevice::m_bytesDownloaded [private] |
Definition at line 103 of file shoutcast.h.
Referenced by socketConnected(), and socketReadyRead().
bool ShoutCastIODevice::m_response_gotten [private] |
Definition at line 104 of file shoutcast.h.
Referenced by getResponse(), socketConnected(), and socketReadyRead().
bool ShoutCastIODevice::m_started [private] |
Definition at line 105 of file shoutcast.h.
Referenced by socketConnected(), and socketReadyRead().
1.6.3