#include <CastSink.h>
Inheritance diagram for CastSink:
server This is an abstract class. A subclass should override at least the sendLogin() function.
Definition at line 62 of file CastSink.h.
Public Member Functions | |
CastSink (TcpSocket *socket, const char *password, unsigned int bitRate, const char *name=0, const char *url=0, const char *genre=0, bool isPublic=false, Sink *streamDump=0, unsigned int bufferDuration=10) throw ( Exception ) | |
Constructor. | |
CastSink (const CastSink &cs) throw ( Exception ) | |
Copy constructor. | |
virtual | ~CastSink (void) throw ( Exception ) |
Destructor. | |
virtual CastSink & | operator= (const CastSink &cs) throw ( Exception ) |
Assignment operator. | |
virtual bool | open (void) throw ( Exception ) |
Open the CastSink. | |
virtual bool | isOpen (void) const throw () |
Check if the CastSink is open. | |
virtual bool | canWrite (unsigned int sec, unsigned int usec) throw ( Exception ) |
Check if the CastSink is ready to accept data. | |
virtual unsigned int | write (const void *buf, unsigned int len) throw ( Exception ) |
Write data to the CastSink. | |
virtual void | flush (void) throw ( Exception ) |
Flush all data that was written to the CastSink to the server. | |
virtual void | close (void) throw ( Exception ) |
Close the CastSink. | |
const char * | getPassword (void) const throw () |
Get the password to the server. | |
const char * | getName (void) const throw () |
Get the name of the stream. | |
const char * | getUrl (void) const throw () |
Get the URL associated with the stream. | |
const char * | getGenre (void) const throw () |
Get the genre of the stream. | |
unsigned int | getBitRate (void) const throw () |
Get the bitrate of the stream (e.g. | |
bool | getIsPublic (void) const throw () |
Get wether this stream is public. | |
unsigned int | getBufferDuration (void) const throw () |
Get the duration of the BufferedSink buffer in seconds. | |
Protected Member Functions | |
CastSink (void) throw ( Exception ) | |
Default constructor. | |
virtual bool | sendLogin (void)=0 throw ( Exception ) |
Log in to the server using the socket avialable. | |
Sink * | getSink (void) const throw () |
Get the Sink underneath this CastSink. | |
TcpSocket * | getSocket (void) const throw () |
Get the TcpSocket underneath this CastSink. |
|
Default constructor. Always throws an Exception.
Definition at line 159 of file CastSink.h. |
|
Constructor.
Definition at line 214 of file CastSink.h. |
|
Copy constructor.
Definition at line 242 of file CastSink.h. |
|
Destructor.
Definition at line 262 of file CastSink.h. |
|
Check if the CastSink is ready to accept data. Blocks until the specified time for data to be available.
Implements Sink. Reimplemented in FileCast. Definition at line 325 of file CastSink.h. References Sink::canWrite(), and getSink(). |
|
Close the CastSink.
Implements Sink. Reimplemented in FileCast. Definition at line 371 of file CastSink.h. References Sink::close(), and getSink(). Referenced by open(). |
|
Flush all data that was written to the CastSink to the server.
Implements Sink. Reimplemented in FileCast. Definition at line 356 of file CastSink.h. References Sink::flush(), and getSink(). |
|
Get the bitrate of the stream (e.g. mp3 bitrate).
Definition at line 430 of file CastSink.h. Referenced by ShoutCast::sendLogin(), IceCast2::sendLogin(), and IceCast::sendLogin(). |
|
Get the duration of the BufferedSink buffer in seconds.
Definition at line 452 of file CastSink.h. |
|
Get the genre of the stream.
Definition at line 419 of file CastSink.h. Referenced by ShoutCast::sendLogin(), IceCast2::sendLogin(), and IceCast::sendLogin(). |
|
Get wether this stream is public.
Definition at line 441 of file CastSink.h. Referenced by ShoutCast::sendLogin(), IceCast2::sendLogin(), and IceCast::sendLogin(). |
|
Get the name of the stream.
Definition at line 397 of file CastSink.h. Referenced by ShoutCast::sendLogin(), IceCast2::sendLogin(), and IceCast::sendLogin(). |
|
Get the password to the server.
Definition at line 386 of file CastSink.h. Referenced by ShoutCast::sendLogin(), IceCast2::sendLogin(), and IceCast::sendLogin(). |
|
Get the Sink underneath this CastSink.
Definition at line 179 of file CastSink.h. References Ref< T >::get(). Referenced by canWrite(), close(), flush(), ShoutCast::sendLogin(), IceCast2::sendLogin(), IceCast::sendLogin(), and write(). |
|
Get the TcpSocket underneath this CastSink.
Definition at line 190 of file CastSink.h. Referenced by ShoutCast::sendLogin(), IceCast2::sendLogin(), and IceCast::sendLogin(). |
|
Get the URL associated with the stream.
Definition at line 408 of file CastSink.h. Referenced by ShoutCast::sendLogin(), IceCast2::sendLogin(), and IceCast::sendLogin(). |
|
Check if the CastSink is open.
Implements Sink. Reimplemented in FileCast. Definition at line 309 of file CastSink.h. Referenced by open(). |
|
Open the CastSink. Logs in to the server.
Implements Sink. Reimplemented in FileCast. Definition at line 115 of file CastSink.cpp. References close(), isOpen(), Reporter::reportEvent(), and sendLogin(). |
|
Assignment operator.
Definition at line 275 of file CastSink.h. References Sink::operator=(). Referenced by ShoutCast::operator=(), IceCast2::operator=(), and IceCast::operator=(). |
|
Log in to the server using the socket avialable.
Implemented in FileCast, IceCast, IceCast2, and ShoutCast. Referenced by open(). |
|
Write data to the CastSink.
Implements Sink. Reimplemented in FileCast. Definition at line 340 of file CastSink.h. References getSink(), and Sink::write(). |