Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

ShoutCast Class Reference

#include <ShoutCast.h>

Inheritance diagram for ShoutCast:

Inheritance graph
[legend]
Collaboration diagram for ShoutCast:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class representing output to a ShoutCast server with icy login.

Author:
Author
darkeye
Version:
Revision
1.3

Definition at line 59 of file ShoutCast.h.

Public Member Functions

 ShoutCast (TcpSocket *socket, const char *password, unsigned int bitRate, const char *name=0, const char *url=0, const char *genre=0, bool isPublic=false, const char *irc=0, const char *aim=0, const char *icq=0, Sink *streamDump=0, unsigned int bufferDuration=10) throw ( Exception )
 Constructor.
 ShoutCast (const ShoutCast &cs) throw ( Exception )
 Copy constructor.
virtual ~ShoutCast (void) throw ( Exception )
 Destructor.
virtual ShoutCastoperator= (const ShoutCast &cs) throw ( Exception )
 Assignment operator.
const char * getIrc (void) const throw ()
 Get the IRC info string for the stream.
const char * getAim (void) const throw ()
 Get the AIM info string for the stream.
const char * getIcq (void) const throw ()
 Get the ICQ info string for the stream.

Protected Member Functions

 ShoutCast (void) throw ( Exception )
 Default constructor.
virtual bool sendLogin (void) throw ( Exception )
 Log in to the server using the socket avialable.


Constructor & Destructor Documentation

ShoutCast::ShoutCast void   )  throw ( Exception ) [inline, protected]
 

Default constructor.

Always throws an Exception.

Exceptions:
Exception 

Definition at line 109 of file ShoutCast.h.

ShoutCast::ShoutCast TcpSocket socket,
const char *  password,
unsigned int  bitRate,
const char *  name = 0,
const char *  url = 0,
const char *  genre = 0,
bool  isPublic = false,
const char *  irc = 0,
const char *  aim = 0,
const char *  icq = 0,
Sink streamDump = 0,
unsigned int  bufferDuration = 10
throw ( Exception ) [inline]
 

Constructor.

Parameters:
socket socket connection to the server.
password password to the server.
name name of the stream.
url URL associated with the stream.
genre genre of the stream.
bitRate bitrate of the stream (e.g. mp3 bitrate).
isPublic is the stream public?
irc IRC info string for the stream.
aim AIM info string for the stream.
icq ICQ info string for the stream.
streamDump an optional sink to dump the binary stream data to.
bufferDuration duration of the BufferedSink buffer in seconds.
Exceptions:
Exception 

Definition at line 146 of file ShoutCast.h.

ShoutCast::ShoutCast const ShoutCast cs  )  throw ( Exception ) [inline]
 

Copy constructor.

Parameters:
cs the ShoutCast to copy.

Definition at line 178 of file ShoutCast.h.

virtual ShoutCast::~ShoutCast void   )  throw ( Exception ) [inline, virtual]
 

Destructor.

Exceptions:
Exception 

Definition at line 190 of file ShoutCast.h.


Member Function Documentation

const char* ShoutCast::getAim void   )  const throw () [inline]
 

Get the AIM info string for the stream.

Returns:
the AIM info string for the stream.

Definition at line 230 of file ShoutCast.h.

Referenced by sendLogin().

const char* ShoutCast::getIcq void   )  const throw () [inline]
 

Get the ICQ info string for the stream.

Returns:
the ICQ info string for the stream.

Definition at line 241 of file ShoutCast.h.

Referenced by sendLogin().

const char* ShoutCast::getIrc void   )  const throw () [inline]
 

Get the IRC info string for the stream.

Returns:
the IRC info string for the stream.

Definition at line 219 of file ShoutCast.h.

Referenced by sendLogin().

virtual ShoutCast& ShoutCast::operator= const ShoutCast cs  )  throw ( Exception ) [inline, virtual]
 

Assignment operator.

Parameters:
cs the ShoutCast to assign this to.
Returns:
a reference to this ShoutCast.
Exceptions:
Exception 

Definition at line 203 of file ShoutCast.h.

References CastSink::operator=().

bool ShoutCast::sendLogin void   )  throw ( Exception ) [protected, virtual]
 

Log in to the server using the socket avialable.

Returns:
true if login was successful, false otherwise.
Exceptions:
Exception 

Implements CastSink.

Definition at line 121 of file ShoutCast.cpp.

References Source::canRead(), Sink::flush(), getAim(), CastSink::getBitRate(), CastSink::getGenre(), getIcq(), getIrc(), CastSink::getIsPublic(), CastSink::getName(), CastSink::getPassword(), CastSink::getSink(), CastSink::getSocket(), CastSink::getUrl(), Sink::isOpen(), Source::isOpen(), Source::read(), STRBUF_SIZE, and Sink::write().


The documentation for this class was generated from the following files:
Generated on Fri May 19 15:36:49 2006 for DarkIce by  doxygen 1.4.4